Object Oriented Programming - Object Modelling - 2

151:  
In a template function, ------- argmnent is generic, or parameterized.
A.

no

B.

exactly one

C.

at least one

D.

more than one

 
 

Option: B

Explanation :

Click on Discuss to view users comments.

Write your comments here:



152:  

A C++ term meaning "generic" is

A.

argument

B.

parameterised

C.

universal

D.

global

 
 

Option: C

Explanation :

Click on Discuss to view users comments.

Write your comments here:



153:  
A function that is prototyped as double calculate (int num); may
A.

receive a double constant such as

B.

receive a double variable

C.

either (a) or (b)

D.

none of these

 
 

Option: B

Explanation :

Click on Discuss to view users comments.

Write your comments here:



154:  
To create an instantiation of a class template with an int, and then create a second instantiation with a double,
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.

This operation in C++ cannot be performed.

 
 

Option: D

Explanation :

Click on Discuss to view users comments.

Write your comments here:



155:  
To use a template class member function, use ---------- with the instantiation. 
A.

scope resolution operator

B.

dot operator

C.

class definition

D.

keyword template

 
 

Option: A

Explanation :

Click on Discuss to view users comments.

Write your comments here: