M
CPP Programming MCQs | Page - 4
Dear candidates you will find MCQ questions of CPP Programming here. Learn these questions and prepare yourself for coming examinations and interviews. You can check the right answer of any question by clicking on any option or by clicking view answer button.
M
Q. Which of the following operator functions cannot be global?
M
Q. Which of the following is true about this pointer?
M
Q. What is the use of this pointer?
M
Q. Which of the following in Object Oriented Programming is supported by Function overloading and default arguments features of C++?
M
Q. Output of the program?
#include<iostream>
using namespace std;
int fun(int x = 0, int y = 0, int z)
{ return (x + y + z); }
int main()
{
cout << fun(10);
return 0;
}
M
Q. Output of following program?
#include <iostream>
using namespace std;
int fun(int=0, int = 0);
int main()
{
cout << fun(5);
return 0;
}
int fun(int x, int y)
{
return (x+y);
}
M
Q. Which of the following is true?
M
Q. If a function is friend of a class, which one of the following is wrong?
M
Q. Which one of the following is correct, when a class grants friend status to another class?
Jump to