Title | 2 - chapter 2 |
---|---|
Author | Chung cxchen |
Course | Problem Solving & Prgmng I Lab |
Institution | Old Dominion University |
Pages | 4 |
File Size | 136 KB |
File Type | |
Total Downloads | 4 |
Total Views | 165 |
chapter 2...
Test 2
1.
2.
3.
4.
In C++, ________ is the stream insertion operator. a. || b. > d. >< In C++, all preprocessor commands begin with ________ . a. < b. @ c. & d. # A(n) ________ is a set of values together with a set of operations. a. operand b. function c. sequence d. data type Which of the following arithmetic operators can you use only with the integral data type? a. / b. % c. + d. *
________ rules tell you which statements are legal or valid. a. Syntax b. Predefined 5. c. Semantic d. Grammatical A string containing no characters is called a(n) ________ string. a. empty b. zero 6. c. non d. missing 7. A variable is said to be ________ the first time a value is placed in the variable.
8.
9.
10.
11.
12.
13.
a. initialized b. declared c. input d. loaded A string is a sequence of ________ . a. one or more characters b. zero or more characters c. no more than 64 characters d. at least two characters The ________ data type is used to represent any real number between -1.7E+308 and 1.7E+308. a. double b. float c. long double d. int ________ are names of things that appear in a program, such as variables, constants, and functions. a. Comments b. Identifiers c. Data types d. Tokens When using the char data type, you enclose each character represented within ________ . a. double quotation marks b. single quotation marks c. brackets d. parentheses The smallest individual unit of a program written in any language is called a ________ . a. token b. bit c. byte d. symbol In C++, the cast operator takes the following form: ________ . a. static_cast(expression) b. expression (dataTypeName) c. static_cast (expression) d. static_cast
14.
15.
16.
17.
18.
19.
20.
A memory location whose content is not allowed to change during program execution is known as a ________ . a. named variable b. reserved word c. named constant d. constant variable The ________ data type is used to represent any real number between -3.4E+38 and 3.4E+38. a. double b. float c. long double d. int A(n) ________ expression contains both integer and floating-point numbers. a. cast b. binary c. associative d. mixed In C++, a ________ is used to end a statement. a. semicolon b. comma c. forward slash d. period ________ lines are executable statements that inform the user what to do. a. Prompt b. Comment c. Document d. Question In C++,...