Exam 2: Introduction to C Programming

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

The assignment operator ________ assigns the value of the expression on its right to the variable on its left.

Free
(Multiple Choice)
4.8/5
(36)
Correct Answer:
Verified

C

Which is the output of the following statements? Std::cout << "Hello "; Std::cout << "World";

Free
(Multiple Choice)
4.8/5
(36)
Correct Answer:
Verified

A

The ________ object enables a program to read data from the user.

Free
(Multiple Choice)
4.8/5
(40)
Correct Answer:
Verified

B

Which of the following statements does not overwrite a preexisting value stored in a memory location?

(Multiple Choice)
5.0/5
(36)

The std::endl stream manipulator________.

(Multiple Choice)
4.8/5
(33)

In what order would the following operators be evaluated -, *, /, +, % Assume that if two operations have the same precedence, the one listed first will be evaluated first.

(Multiple Choice)
4.8/5
(35)

Which of the following is not a valid C++ identifier?

(Multiple Choice)
4.8/5
(36)

Which of the following is a variable declaration statement?

(Multiple Choice)
4.9/5
(41)

Which of the following statements would display the phrase C++ is fun?

(Multiple Choice)
4.8/5
(38)

Which of the following is a compilation error?

(Multiple Choice)
4.8/5
(38)

What will be the output after the following C++ statements have been executed? Int a, b, c, d; A = 4; B = 12; C = 37; D = 51; If a < b ) Cout << "a < b" << endl; If a > b ) Cout << "a > b" << endl; If d <= c ) Cout << "d <= c" << endl; If c != d ) Cout << "c != d" << endl;

(Multiple Choice)
4.8/5
(33)

What is the value of result after the following C++ statements execute? Int a, b, c, d, result; A = 4; B = 12; c = 37; D = 51; Result = d % a * c + a % b + a;

(Multiple Choice)
4.9/5
(34)

Which of the following is not a syntax error?

(Multiple Choice)
4.9/5
(29)

Which of the following code segments prints a single line containing hello there with the words separated by a single space?

(Multiple Choice)
4.8/5
(46)

Which of the following statements could potentially change the value of number2?

(Multiple Choice)
4.9/5
(37)

The escape sequence for a newline is:

(Multiple Choice)
4.9/5
(38)

End-of-line comments that should be ignored by the compiler are denoted using:

(Multiple Choice)
4.8/5
(32)

Which of the following is not an arithmetic operator?

(Multiple Choice)
4.8/5
(30)

Each of the following is a relational or equality operator except:

(Multiple Choice)
4.9/5
(37)

Which of the following is the escape character?

(Multiple Choice)
4.9/5
(37)
Showing 1 - 20 of 21
close modal

Filters

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