Exam 2: Introduction to C
Exam 1: Introduction to Computers and Programming47 Questions
Exam 2: Introduction to C62 Questions
Exam 3: Expressions and Interactivity45 Questions
Exam 4: Making Decisions51 Questions
Exam 5: Loops and Files60 Questions
Exam 6: Functions49 Questions
Exam 7: Arrays and Vectors56 Questions
Exam 8: Searching and Sorting Arrays30 Questions
Exam 9: Pointers47 Questions
Exam 10: Characters, C-Strings, and More About the String Class47 Questions
Exam 11: Structured Data46 Questions
Exam 12: Advanced File Operations38 Questions
Exam 13: Introduction to Classes54 Questions
Exam 14: More About Classes46 Questions
Exam 15: Inheritance, Polymorphism, and Virtual Functions43 Questions
Exam 16: Exceptions and Templates36 Questions
Exam 17: The Standard Template Library38 Questions
Exam 18: Linked Lists41 Questions
Exam 19: Stacks and Queues47 Questions
Exam 20: Recursion27 Questions
Exam 21: Binary Trees39 Questions
Select questions type
Select all that apply. Which of the following statements is(are) true about named constants?
Free
(Multiple Choice)
4.9/5
(29)
Correct Answer:
B, C, D
Floating point constants are normally stored in memory as doubles.
Free
(True/False)
4.9/5
(32)
Correct Answer:
True
What is the value stored in the variable myNum after the following assignment statement executes?
MyNum = 23 % 5
(Multiple Choice)
4.8/5
(30)
Using C++11:
What data type does the compiler determine for the variable cost in the following statement?
Auto cost = 14.95;
(Multiple Choice)
4.9/5
(35)
Assuming that a program has the following string object definition, which statement correctly assigns the string literal "Jane" to the string object?
String name;
(Multiple Choice)
4.8/5
(40)
In memory, C++ automatically places a(n) __________ at the end of string literals which __________.
(Multiple Choice)
4.9/5
(29)
What is the value of cookies after the following statements execute?
Int number = 38, children = 4, cookies;
Cookies = number % children;
(Multiple Choice)
4.8/5
(42)
Escape sequences are always stored internally as a single character.
(True/False)
4.9/5
(38)
What will be the output after the following lines of code execute?
bool choice;
choice = true;
cout << "Your choice is " << choice << endl;
(Multiple Choice)
4.8/5
(33)
What will the following code display?
Cout << "Four\n" << "score\n";
Cout << "and" << "\nseven";
Cout << "\nyears" << " ago" << endl;
(Multiple Choice)
4.8/5
(34)
In programming, the terms "line" and "statement" always mean the same thing.
(True/False)
4.8/5
(30)
What will the following code display?
Cout << "Roses " << "are red";
Cout << "and " << "violets/n"
Cout << "are" << "blue" << endl;
(Multiple Choice)
4.7/5
(34)
Besides the decimal number system that is most common (base 10), two other number systems that can be used in C++ programs are
(Multiple Choice)
5.0/5
(37)
Because C++ is case-sensitive, all programs must have a function called main or Main.
(True/False)
4.8/5
(43)
In C++ you are required to name your variables so they indicate the purpose they will be used for.
(True/False)
4.7/5
(35)
The data type used to declare variables that can hold real numbers is
(Multiple Choice)
4.8/5
(32)
C++ 11 introduced an alternative way to define variables, using the template key word and an initialization value.
(True/False)
4.8/5
(33)
Showing 1 - 20 of 62
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)