Exam 2: Introduction to C

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

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)

A variable definition tells the computer

(Multiple Choice)
4.8/5
(30)

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 \quad int hours; 9 \quad double payRate, grossPay; 10 11 \quad hours = 40; 12 \quad payRate = 20.0; 13 \quad grossPay = hours * payRate; 14 \quad cout << "My gross pay is $" << grossPay << endl; 15 \quad 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
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)