A
Here, you will find a collection of MCQ questions on C++. Go through these questions to enhance your preparation for upcoming examinations and interviews.
To check the correct answer, simply click the View Answer button provided for each question.
Have your own questions to contribute? Click the button below to share your MCQs with others!
+ Add QuestionA
A
A
#include using namespace std; long fact (long p) { if (p > 1) return (p * fact (p + 1)); else return (1); } int main () { long n = 6; cout << n << "! = " << fact ( n ); return 0; }
A
#include using namespace std; void square (int *p) { *p = (*p + 3) * (*p); } int main ( ) { int n = 15; square(&n); cout << n; return 0; }
A
#include using namespace std; int add(int p, int q); int main() { int k = 7, L = 9; cout << add(k, L) << endl; return 0; } int add(int p, int q ) { int sum = p + q; p = 10; return p + q; }
A
A
#include using namespace std; int main() { /* this is comment* cout << "Uday"; return 0; }
A
A
A
If you want to share an MCQ question in this category, it's a great idea! It will be helpful for many other students using this website.
Share Your MCQ