Object Oriented Programming Using C++ – Section 9

21. To use this pointer with a member function, you _____

A. declare this as static
B. declare this as global
C. define this as equal to the address of the appropriate object
D. do nothing; it is automatically supplied for you

Correct Answer:   D. do nothing; it is automatically supplied for you

22. A function that is prototype as int calculate(int num); may

A. receive an integer variable named num from the main() program
B. receive any integer variable from the main() program
C. either (a) or (b)
D. neither (a) nor (b)

Correct Answer:   C. either (a) or (b)

23. A do-while loop contains

A. only one statement between the do statement and the while statement
B. several statements between the do statement and the while statement
C. no statement at all between the do statement and the while statement
D. only two statements between the do statement and the while statement
E. None of the above

Correct Answer:   B. several statements between the do statement and the while statement

24. The braces that surround the code in a ‘C program

A. show what code goes in a particular function
B. delimit a section of code
C. separate the codes from the constant
D. separate the source file from the subject file
E. None of the above

Correct Answer:   B. delimit a section of code

25. The indirection operator is the

A. asterisk
B. ampersand
C. dollar sign
D. plus sign

Correct Answer:   A. asterisk

Leave A Comment?

13 + two =