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
A
#include
using namespace std;
int main()
{
int k;
enum Month {
January = 1, February ,March, April, May, June, July, August, September, October, November, December
};
for (k = April; k <= September; k++)
cout << k;
return 0;
}
A
#include
using namespace std;
int main()
{
enum channel {hotstar, zeetv, max};
enum symbol {anamol, hotstar};
int k = 0;
for (k = hotstar; k <= zeetv; k++) {
cout << k;
}
return 0;
}
A
#include
using namespace std;
enum Gender {
male, female, transgender
};
int main()
{
cout << male<< female<< transgender;
return 0;
}
A
#include
using namespace std;
enum test
{
p = 20, q, r
};
int main()
{
cout << p <<" " << q<< " " << r;
return 0;
}
A
#include
using namespace std;
enum boy
{
num = 20
};
int main()
{
int age = 100;
age /= num;
cout << "If you were boy, you would be " << age << endl;
return 0;
}
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