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. Using C++11:
Which of the following can be used to initialize an integer variable named dozen with the value of 12?
(Multiple Choice)
4.8/5
(28)
The float data type is considered ___________ precision and the double data type is considered __________ precision.
(Multiple Choice)
4.8/5
(39)
Given the following program, which line(s) cause(s) output to be displayed on the screen?
1 // This program displays my gross wages.
2 // I worked 40 hours and I make $20.00 per hour.
3 #include <iostream>
4 using namespace std;
5
6 int main()
7 {
8 int hours;
9 double payRate, grossPay;
10
11 hours = 40;
12 payRate = 20.0;
13 grossPay = hours * payRate;
14 cout << "My gross pay is $" << grossPay << endl;
15 return 0;
16 }
(Multiple Choice)
4.8/5
(29)
What is output of the following statement?
cout << 4 * (15 / (1 + 3)) << endl;
(Multiple Choice)
4.8/5
(36)
A character literal is __________, whereas a string literal is __________
(Multiple Choice)
4.8/5
(28)
What is the value of number after the following statements execute?
Int number;
Number = 18 % 4 + 2;
(Multiple Choice)
4.8/5
(31)
Which of the following defines a double-precision floating-point variable named payCheck?
(Multiple Choice)
4.8/5
(37)
The __________ causes the content of another file to be inserted into a program.
(Multiple Choice)
4.7/5
(36)
Which of the following statements correctly defines a named constant named TAX_RATE that holds the value 0.075?
(Multiple Choice)
4.8/5
(35)
Programming style refers to the way a programmer uses elements such as identifiers, spaces, and blank lines.
(True/False)
4.9/5
(37)
Data items whose values do not change while the program is running are
(Multiple Choice)
4.8/5
(31)
A statement that starts with a hashtag (or pound) symbol (#) is called a
(Multiple Choice)
4.9/5
(31)
In the following statement, the characters Hello! are a(n) cout << "Hello!";
(Multiple Choice)
4.8/5
(28)
Which of the following must be included in any program that uses the cout object?
(Multiple Choice)
4.7/5
(34)
A(n) __________ represents a storage location in the computer's memory.
(Multiple Choice)
4.8/5
(36)
What will the following code display?
int x = 23, y = 34, z = 45;
cout << x << y << z << endl;
(Multiple Choice)
4.9/5
(39)
In a cout statement, which of the following will advance the output position to the beginning of the next line?
(Multiple Choice)
4.9/5
(39)
Which data type typically requires only one byte of storage?
(Multiple Choice)
4.8/5
(38)
A named constant is like a variable, but it its content cannot be changed while the program is running.
(True/False)
4.8/5
(42)
Showing 41 - 60 of 62
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)