Exam 2: Evaluating C Expressions

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

(4 - 4) = = 0 evaluates to ____.

(Multiple Choice)
4.8/5
(37)

The result of evaluating 3 / 4 + 2.2 is ____.

(Multiple Choice)
4.7/5
(42)

What are the relational operators in C++?

(Essay)
4.8/5
(41)

The two categories of shortcut arithmetic operators are ____________________ operators and increment and decrement operators.

(Essay)
4.9/5
(42)
Match each term with the correct statement below.
Premises:
modulus and assign operator
Responses:
+
++count
mixed expression
Correct Answer:
Verified
Premises:
Responses:
modulus and assign operator
+
(Matching)
4.9/5
(39)

Write the following operators in order of precedence, from highest to lowest: float int doable char unsigned long long double long short unsigned int

(Essay)
4.8/5
(30)

When an expression includes a(n) ____ operator, the mathematical operation takes place after the expression is evaluated.

(Multiple Choice)
4.8/5
(34)

What is the hexadecimal numbering system? When is it typically used?

(Essay)
4.8/5
(33)
Match each term with the correct statement below.
Premises:
prefix increment operator
Responses:
implicit cast
long double
count++
Correct Answer:
Verified
Premises:
Responses:
prefix increment operator
implicit cast
(Matching)
4.7/5
(47)

To ____ a value is to transform it to another data type.

(Multiple Choice)
4.8/5
(36)

C++ provides ____ simple arithmetic operators for creating arithmetic expressions.

(Multiple Choice)
4.8/5
(36)

The expression cout 2); yields ____ as output.

(Multiple Choice)
4.9/5
(39)

Explain what the following statement means: "If you will use a calculated value later in a program, it is inefficient not to store it."

(Essay)
4.8/5
(31)

Explain why using modulus with negative numbers can lead to unexpected results.

(Essay)
4.9/5
(39)
Match each term with the correct statement below.
Premises:
positive value operator when used alone in front of an operand
Responses:
long double
associativity
%=
Correct Answer:
Verified
Premises:
Responses:
positive value operator when used alone in front of an operand
long double
(Matching)
4.8/5
(39)

How can you perform an explicit cast?

(Essay)
4.9/5
(45)

____ is not a valid operator in C++.

(Multiple Choice)
4.9/5
(34)

____________________ are those that require only one operand.

(Short Answer)
4.8/5
(31)

!5 evaluates to ____.

(Multiple Choice)
4.9/5
(49)

What is a common C++ programming error when comparing two values in C++?

(Essay)
4.7/5
(39)
Showing 21 - 40 of 51
close modal

Filters

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