Object Oriented Programming Using C++ – Section 11

6. The expression c = i++ causes

A. the value of i assigned to c and then i incremented by 1
B. i to be incremented by 1 and then the value of i assigned to c
C. value of i assigned to c
D. i to be incremented by 1
E. None of the above

Correct Answer:  A. the value of i assigned to c and then i incremented by 1
Advertisement

7. An identifier in C

A. is a name of a thing such as variable and function
B. is made up of letters, numerals, and the underscore
C. can contain both uppercase and lowercase letters
D. All of the above
E. None of the above

Correct Answer:  D. All of the above
Advertisement

8. Which of the following creates a String named constant called partNo, whose value is AB45?

A. const char[4] partNo = “AB45”;
B. const char[5] partNo = ‘AB45’;
C. const char[5] partNo = “AB45”;
D. const char partNo[5] = “AB45”;
E. None of the above

Correct Answer:  D. const char partNo[5] = “AB45”;
Advertisement

9. The bitwise AND operator is represented by the symbol

A. ^
B. &
C. &&
D. >>
E. None of the above

Correct Answer:  B. &
Advertisement

10. The exclusive OR operator gives the result 1 when

A. both the bits are 0
B. one bit is 0 and the other is 1
C. both the bits are 1
D. no hard and fast rule
E. None of the above

Correct Answer:  B. one bit is 0 and the other is 1
Advertisement

Leave A Comment?