Assignment2 - 1. Mark the following statements as true or...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
1. Mark the following statements as true or false. A. An identifier can be any sequence of digits and letters – False B. In C++, there is no difference between a reserved word and a predefined identifier – False C. A C++ identifier can start with a digit – False D. The operands of the modulus operator must be integers – True E. If a=4; and b=3; then after the statement a=b; the value of b is still 3. – True F. In the statement cin >> y; y can only be an int or double variable – False G. In an output statement, the newline character may be a part of the string - True H. The following is a legal C++ program: True int main ( ) { return 0; } I. In a mixed expression, all the operands are converted to floating-point numbers. - False J. Suppose x = 5. After the statement y = x++; executes, y is 5 and x is 6. - True K. Suppose a = 5. After the statement ++a; executes, the value of a is still 5 because the value of the expression is not saved in another variable. - False 2. Which of the following are valid C++ identifiers?
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/21/2008 for the course CSC 124 taught by Professor Salim during the Fall '07 term at California University of Pennsylvania.

Page1 / 2

Assignment2 - 1. Mark the following statements as true or...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online