Exam 2: Basic Elements of C++

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

Choose the output of the following C++ statement: cout << "Sunny " << '\n' << "Day " << endl;

(Multiple Choice)
4.7/5
(43)

If a C++ arithmetic expression has no parentheses,operators are evaluated from left to right.

(True/False)
4.9/5
(36)

____________________ is the process of planning and creating a program.

(Short Answer)
4.8/5
(40)

Which of the following is a reserved word in C++?

(Multiple Choice)
4.8/5
(34)

In C++,reserved words are the same as predefined identifiers.

(True/False)
4.7/5
(33)

A mixed arithmetic expression contains all operands of the same type.

(True/False)
4.8/5
(34)

____ are executable statements that inform the user what to do.

(Multiple Choice)
5.0/5
(38)

Which of the following is the newline character?

(Multiple Choice)
4.9/5
(37)

A(n)____________________ is a memory location whose contents can be changed.

(Short Answer)
4.9/5
(42)

Suppose that count is an int variable and count = 1.After the statement count++; executes,the value of count is ____.

(Multiple Choice)
4.8/5
(44)

An operator that has only one operand is called a unique operator.

(True/False)
4.9/5
(30)

Suppose that sum and num are int variables and sum = 5 and num = 10.After the statement sum += num executes,____.

(Multiple Choice)
4.9/5
(34)

Suppose that alpha and beta are int variables.The statement alpha = --beta; is equivalent to the statement(s)____.

(Multiple Choice)
4.9/5
(39)

____ is a valid char value.

(Multiple Choice)
4.7/5
(43)

The ____________________ type is C++ 's method for allowing programmers to create their own simple data types.

(Short Answer)
5.0/5
(39)

In a C++ program,one and two are double variables and input values are 10.5 and 30.6.After the statement cin >> one >> two; executes,____.

(Multiple Choice)
4.9/5
(38)

____________________ can be used to identify the authors of the program,give the date when the program is written or modified,give a brief explanation of the program,and explain the meaning of key statements in a program.

(Short Answer)
4.8/5
(32)

____________________ rules determine the meaning of instructions.

(Short Answer)
4.8/5
(33)

The smallest individual unit of a program written in any language is called a(n)____________________.

(Short Answer)
4.9/5
(34)

Consider the following code. // Insertion Point 1 Using namespace std; Const float PI = 3.14; Int main() { \quad //Insertion Point 2 \quad Float r = 2.0; \quad Float area; \quad Area = PI * r * r; \quad Cout << "Area = " << area << endl; \quad Return 0; } // Insertion Point 3 In this code,where does the include statement belong?

(Multiple Choice)
4.9/5
(37)
Showing 21 - 40 of 50
close modal

Filters

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