C++ MCQ Questions and Answers
Practice ModeShowing 10 of 93 questions
Q81
Overloaded functions are
Answer: Option D
Q82
Functions can be declared with default values in parameters. We use default keyword to specify the value of such parameters.
Answer: Option B
Q83
Examine the following program and determine the output
#include <iostream>
using namespace std;
int operate (int a, int b)
{
return (a * b);
}
float operate (float a, float b)
{
return (a/b);
}
int main()
{
int x=5, y=2;
float n=5.0, m=2.0;
cout << operate(x,y) <<"\t";
cout << operate (n,m);
return 0;
}
Answer: Option D
Q84
A function can not be overloaded only by its return type.
Answer: Option A
Q85
A function can be overloaded with a different return type if it has all the parameters same.
Answer: Option B
Q86
Inline functions involves some additional overhead in running time.
Answer: Option A
Q87
A function that calls itself for its processing is known as
Answer: Option D
Q88
We declare a function with ______ if it does not have any return type
Answer: Option C
Q89
Arguments of a functions are separated with
Answer: Option A
Q90
Variables inside parenthesis of functions declarations have _____ level access.
Answer: Option A