Object Oriented Programming Using C++ – Section 11

36. Two or more arrays whose elements are related by their position (subscript) in the arrays are called _____ arrays

A. horizontal
B. paired
C. parallel
D. related
E. vertical

Correct Answer:  C. parallel

37. Assume that a program creates and initializes a Short Integer variable named age and a pointer named age Ptr, to which it assigns the address of the age variable. Which of the following statements will assign the number 21  to the age variable?

A. age = 21;
B. *age = 21;
C. agePtr = 21;
D. *agePtr = 21;
E. both (a) and (d)

Correct Answer:  E. both (a) and (d)

38. The statement fwrite ( (char*)&objl, sizeof(objl) );

A. writes the member functions of objl to fl
B. writes the data in objl to fl
C. writes the member functions and me data of obj 1 to fl
D. writes the address of objl to fl

Correct Answer:  B. writes the data in objl to fl

39. The body of a C++ function is surrounded by _____

A. parentheses
B. angle brackets
C. curly brackets
D. square brackets

Correct Answer:  C. curly brackets

40. Which of the following type casts will convert an Integer variable named amount to a Double type?

A. (double) amount
B. (int to double) amount
C. int to double(amount)
D. int (amount) to double

Correct Answer:  A. (double) amount

Leave A Comment?

1 × 3 =