Dear candidates you will find MCQ questions of C++ 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.
Share your questions by clicking Add Question
#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;
}
#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;
}
#include
using namespace std;
enum Gender {
male, female, transgender
};
int main()
{
cout << male<< female<< transgender;
return 0;
}
#include
using namespace std;
enum test
{
p = 20, q, r
};
int main()
{
cout << p <<" " << q<< " " << r;
return 0;
}
#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;
}