Chapter 15: Polymorphism - Online Test

Q1. The ability of the function to process the message or data in more than one form is called as
Answer : Option A
Explaination / Solution:
No Explaination.


Q2. The mechanism of giving special meaning to an operator is known as
Answer : Option B
Explaination / Solution:
No Explaination.


Q3. Provides flexibility of creating multiple type of objects for a class.
Answer : Option C
Explaination / Solution:
No Explaination.


Q4. Which of the following operator is overloaded?
Answer : Option D
Explaination / Solution:
No Explaination.


Q5. Which of the following refers to a function having more than one distinct meaning?
Answer : Option A
Explaination / Solution:
No Explaination.


Q6. Which of the following reduces the number of comparisons in a program ?
Answer : Option C
Explaination / Solution:
No Explaination.


Q7.

void dispchar(char ch=’$’,int size=10)

{

for(int i=1;i<=size;i++)

cout<<ch;

}

How will you invoke the function dispchar() for the following input?

To print $ for 10 times

Answer : Option C
Explaination / Solution:
No Explaination.


Q8. Which of the following is not true with respect to function overloading?
Answer : Option B
Explaination / Solution:
No Explaination.


Q9. Which of the following is invalid prototype for function overloading
Answer : Option B
Explaination / Solution:
No Explaination.


Q10.

Which of the following function(s) combination cannot be considered as

overloaded function(s) in the given snippet ?

void print(char A,int B); // F1

void printprint(int A, float B); // F2

void Print(int P=10); // F3

void print(); // F4

Answer : Option D
Explaination / Solution:
No Explaination.