Computer Science - Object Oriented Programming Using C++

26. 

If you create an instantiation of a class template with an int, and then create a second instantiation with a double, then

A. you must precede each function call with the word int or double
B. once a function is used as one type, it becomes unavailable for use with the other type
C. there is no difference in the procedure to call a member function
D. you cannot perform this operation in C++

Answer: Option A

Explanation:

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

27. 

The step-by-step instructions that solve a problem are called _____

A. an algorithm
B. a list
C. a plan
D. a sequential structure

Answer: Option A

Explanation:

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

28. 

The type to be used in an instantiation of a class template follows ________

A. the generic class name
B. the keyword template
C. the keyword class
D. the template definition

Answer: Option A

Explanation:

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

29. 

Which of the following statements allows the user to enter data at the keyboard?

A. cin << currentPay;
B. cin >> currentPay;
C. cout << currentPay;
D. cout >> currentPay;
E. None of the above

Answer: Option B

Explanation:

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

30. 

When you pass a variable _____, C++ passes only the contents of the variable to the receiving function

A. by reference
B. by value
C. globally
D. locally

Answer: Option B

Explanation:

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