Exam 1: P A C++ Primer

arrow
  • Select Tags
search iconSearch Question
  • Select Tags

Assume you have declared: Int [4][5] an_Array; You would assign 8 to the last array component with the statement __________.

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

A

The notation for applying a member function to an object is called dot notation.

Free
(True/False)
4.8/5
(41)
Correct Answer:
Verified

True

Which value of n will cause the condition (n >0 && n < 10) to evaluate to true?

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

B

The function substr returns a new __________ containing a portion of the string object to which it is applied.

(Short Answer)
4.8/5
(42)

In C++, the __________ format is the default floating-point format.

(Multiple Choice)
4.8/5
(44)

By default, ifstreams have the "in flag" set, ofstreams have the "out flag" set, and __________ have both in and out set.

(Short Answer)
4.8/5
(43)

A C++ program is __________ into a form that is directly executed by the computer.

(Short Answer)
5.0/5
(48)

If num = 1 when the condition (num != 0 && sum / num) is tested, the expression after && is not evaluated.

(True/False)
4.9/5
(35)

The line int main () identifies the place where the operating system begins the execution of a program.

(True/False)
4.8/5
(32)

In operations involving mixed-type operands, the numeric type of the smaller range is converted to the numeric type of the larger range.

(True/False)
4.9/5
(46)

You can use either students[0] or __________ to reference the first element of an array named students.

(Short Answer)
4.9/5
(35)

The following code segment should include the __________ statement at the end of each case to cause proper exit of control. switch (operator) { case '+': result = x + y; add_op++; /* missing statement */ case '/': result = x / y; divide_op++; /* missing statement */ default: ; }

(Short Answer)
4.8/5
(36)

To delete a dynamically allocated array named students, use the statement __________ students.

(Short Answer)
4.8/5
(34)

An output __________ is a sequence of characters representing program output.

(Multiple Choice)
4.8/5
(47)

C++ uses type __________ to represent logical data.

(Short Answer)
4.7/5
(43)

In C++, function parameters are either call-by-value or call-by-__________.

(Short Answer)
4.8/5
(31)

The# include directive has one of two forms: #include <header> and __________.

(Multiple Choice)
4.8/5
(42)

In C++, an array is also an object.

(True/False)
4.8/5
(53)

Objects that are declared outside the scope of a function or class are called __________ objects.

(Short Answer)
4.9/5
(44)

Beginnings and ends of tokens are marked by characters, referred to as __________, that cannot be part of the tokens they separate.

(Multiple Choice)
4.8/5
(44)
Showing 1 - 20 of 25
close modal

Filters

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