Computer Science - Object Oriented Programming Using C++

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

Answer: Option C

Explanation:

No answer description available for this question. Let us discuss.

37. 

Assume that a program creates and initializes a Short Integer variable named age and a pointer named agePtr, 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)

Answer: Option E

Explanation:

No answer description available for this question. Let us discuss.

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

Answer: Option B

Explanation:

No answer description available for this question. Let us discuss.

39. 

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

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

Answer: Option C

Explanation:

No answer description available for this question. Let us discuss.

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

Answer: Option A

Explanation:

No answer description available for this question. Let us discuss.