NIU CSCI 240 Exam 1 Study Guide Questions and Correct Verified Answers Latest Versio
2 views 0 purchase
Course
NIU CSCI
Institution
NIU CSCI
main() marks the beginning of a C++ program. What C++ reserved word
precedes it?
int
Most lines in a C++ program end with a
; (semi-colon)
According to the lecture notes, the two main conceptual components of a
program are _____ and _____.
data and instructions
Modify (rewrite) the fol...
NIU CSCI 240 Exam 1 Study Guide
Questions and Correct Verified
Answers Latest Version
main() marks the beginning of a C++ program. What C++ reserved word
precedes it?
✓ int
Most lines in a C++ program end with a
✓ ; (semi-colon)
According to the lecture notes, the two main conceptual components of a
program are _____ and _____.
✓ data and instructions
Modify (rewrite) the following instruction so that the subtraction is evaluated
first:
i = a * b / c - d;
✓ i= a*b/(c-d);
About how many decimal places of accuracy does a float have?
assuming that C and F are both declared as doubles, and F has a valid value.
✓ What's wrong with it is you're always going to get 0 because it is integer
division and 5 does not go into 9 evenly. You can fix it by typecasting or
writing 5.0/9 (that will give you the remainder).
About how many decimal places of accuracy does a double have?
✓ 12
What instruction will display data on the screen from a C++ program?
✓ cout
Name two libraries that should be #include'd at the top of a C++ program.
✓ #include <iostream>
✓ #include <iomanip>
Explain in detail what the following instruction does (assuming i is declared as
int):
Master01 | September, 2024/2025 | Latest update
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller ExamArsenal. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $12.49. You're not tied to anything after your purchase.