Exam 2: C++ Basics

arrow
  • Select Tags
search iconSearch Question
  • Select Tags

What is the value of x after the following statements? Int x; X = 0; X = x + 30;

(Multiple Choice)
4.9/5
(31)

The opposite of x >3 && x < 10)is x < 3 && x > 10)

(True/False)
4.8/5
(34)

Which of the following lines correctly reads a value from the keyboard and stores it in the variable named myFloat?

(Multiple Choice)
4.9/5
(30)

Given the following code fragment,which of the following expressions is always true? Int x; Cin >> x;

(Multiple Choice)
4.9/5
(39)

Write the loop condition to continue a while loop as long as x is negative.____________________

(Short Answer)
4.8/5
(30)

What is the correct conditional statement to determine if x is between 19 and 99? __________________

(Short Answer)
4.9/5
(42)

Executing one or more statements one or more times is known as:

(Multiple Choice)
4.8/5
(30)

When must we use braces to define the body of a contitional expression? ______________

(Essay)
4.8/5
(37)

The opposite of less than is greater than

(True/False)
4.9/5
(37)

What is the value of x after the following statements? Int x,y,z; Y = 10; Z = 3; X = y * z + 3;

(Multiple Choice)
5.0/5
(49)

<< is called the stream ____________________ operator.

(Short Answer)
4.8/5
(33)

What is the final value of x after the following fragment of code executes? Int x=0; Do { X++; }whilex > 0);

(Multiple Choice)
4.8/5
(32)

Every line in a program should have a comment.

(True/False)
4.8/5
(38)

Given the following code fragment,what is the output? Int x=5; If x > 5) Cout << "x is bigger than 5."; Cout <<"That is all."; Cout << "Goodbye\n";

(Multiple Choice)
4.8/5
(37)

Which of the following is a valid identifier?

(Multiple Choice)
4.8/5
(37)

What is the value of x after the following statements? Float x; X = 15/4;

(Multiple Choice)
4.8/5
(31)

Each time a loop body executes is known as an _______________________.

(Short Answer)
4.8/5
(31)

Given the following code fragment,what is the final value of y? Int x,y; X = -1; Y = 0; Whilex < 3) { Y += 2; X += 1; }

(Multiple Choice)
4.7/5
(38)

What is the correct way to write the condition y < x < z?

(Multiple Choice)
4.9/5
(30)

Variable names may begin with a number.

(True/False)
4.8/5
(38)
Showing 21 - 40 of 54
close modal

Filters

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