Exam 2: Introduction to C

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

A multi-line comment

Free
(Multiple Choice)
5.0/5
(35)
Correct Answer:
Verified

D

Select all that apply. Which of the following statements is(are) true about named constants?

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

B, C, D

Floating point constants are normally stored in memory as doubles.

Free
(True/False)
4.9/5
(32)
Correct Answer:
Verified

True

What is the value stored in the variable myNum after the following assignment statement executes? MyNum = 23 % 5

(Multiple Choice)
4.8/5
(30)

Using C++11: What data type does the compiler determine for the variable cost in the following statement? Auto cost = 14.95;

(Multiple Choice)
4.9/5
(35)

The preprocessor executes after the compiler.

(True/False)
4.7/5
(34)

Assuming that a program has the following string object definition, which statement correctly assigns the string literal "Jane" to the string object? String name;

(Multiple Choice)
4.8/5
(40)

A value is stored in a variable with an assignment statement.

(True/False)
4.9/5
(32)

In memory, C++ automatically places a(n) __________ at the end of string literals which __________.

(Multiple Choice)
4.9/5
(29)

What is the value of cookies after the following statements execute? Int number = 38, children = 4, cookies; Cookies = number % children;

(Multiple Choice)
4.8/5
(42)

Escape sequences are always stored internally as a single character.

(True/False)
4.9/5
(38)

What will be the output after the following lines of code execute? bool choice; choice = true; cout << "Your choice is " << choice << endl;

(Multiple Choice)
4.8/5
(33)

What will the following code display? Cout << "Four\n" << "score\n"; Cout << "and" << "\nseven"; Cout << "\nyears" << " ago" << endl;

(Multiple Choice)
4.8/5
(34)

In programming, the terms "line" and "statement" always mean the same thing.

(True/False)
4.8/5
(30)

What will the following code display? Cout << "Roses " << "are red"; Cout << "and " << "violets/n" Cout << "are" << "blue" << endl;

(Multiple Choice)
4.7/5
(34)

Besides the decimal number system that is most common (base 10), two other number systems that can be used in C++ programs are

(Multiple Choice)
5.0/5
(37)

Because C++ is case-sensitive, all programs must have a function called main or Main.

(True/False)
4.8/5
(43)

In C++ you are required to name your variables so they indicate the purpose they will be used for.

(True/False)
4.7/5
(35)

The data type used to declare variables that can hold real numbers is

(Multiple Choice)
4.8/5
(32)

C++ 11 introduced an alternative way to define variables, using the template key word and an initialization value.

(True/False)
4.8/5
(33)
Showing 1 - 20 of 62
close modal

Filters

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