Module 2

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

What is the output of the following statement?cout << 15 % 4 << endl; A) 2 B) 3 C) 4 D) None of these

B) 3

In memory, C++ automatically places a ___________ at the end of string literals. A) Semicolon B) Quotation marks C) Null terminator D) Newline escape sequence E) None of the above

C) Null terminator

A statement that starts with a # is called a A) Comment B) Function C) Preprocessor directive D) Key word

C) Preprocessor directive

Which character signifies the beginning of an escape sequence? A) // B) / C) \ D) # E) {

C) \

The ______ is/are used to display information on the computer's screen. A) Opening and closing braces B) Opening and closing quotation marks C) cout D) Backslash E) None of the above

C) cout

The numeric data types in C++ can be broken into two general categories: A) numbers and characters B) singles and doubles C) integer and floating point D) real and unreal 3) None of the above

C) integer and floating point

What is the output of the following statement? cout << 15 / 4 << endl; A) 3 B) 3.75 C) 4 D) None of these

A) 3

A piece of data that is written directly into a program's code. A) Literal B) Variable C) Comment D) Integer

A) Literal

Of the following, which is a valid C++ identifier? A) june1997 B) _employee_number C) _cs#department. D) a and b E) a, b and c

D) a and b

Which data type typically requires only one byte of storage? A) short B) int C) float D) char E) double

D) char

A character literal is enclosed in ________ quotation marks, whereas a string literal is enclosed in ________ quotation marks. A) double, single B) triple, double C) open, closed D) single, double E) None of the above

D) single, double


Kaugnay na mga set ng pag-aaral

Honors Chemistry Chapter 11 Assessment

View Set

Ch. 2 accrued interest calculations

View Set

Personal Finance 8/9 A (S.M.A.R.T. Goals)

View Set