C++ MCQ Questions and Answers

Practice Mode
Showing 10 of 93 questions
Q81
Overloaded functions are
  • A Very long functions that can hardly run
  • B One function containing another one or more functions inside it.
  • C Two or more functions with the same name but different number of parameters or type.
  • D None of above
Answer: Option D
Q82
Functions can be declared with default values in parameters. We use default keyword to specify the value of such parameters.
  • A TRUE
  • B FALSE
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; }
  • A 10.0 5.0
  • B 5.0 2.5
  • C 10.0 5
  • D 10 2.5
Answer: Option D
Q84
A function can not be overloaded only by its return type.
  • A TRUE
  • B FALSE
Answer: Option A
Q85
A function can be overloaded with a different return type if it has all the parameters same.
  • A TRUE
  • B FALSE
Answer: Option B
Q86
Inline functions involves some additional overhead in running time.
  • A TRUE
  • B FALSE
Answer: Option A
Q87
A function that calls itself for its processing is known as
  • A Inline Function
  • B Nested Function
  • C Overloaded Function
  • D Recursive Function
Answer: Option D
Q88
We declare a function with ______ if it does not have any return type
  • A long
  • B double
  • C void
  • D int
Answer: Option C
Q89
Arguments of a functions are separated with
  • A comma (,)
  • B semicolon (Wink
  • C colon (Smile
  • D None of these
Answer: Option A
Q90
Variables inside parenthesis of functions declarations have _____ level access.
  • A Local
  • B Global
  • C Module
  • D Universal
Answer: Option A
Questions and Answers for Competitive Exams Various Entrance Test