MCQs > IT & Programming > C++ > Consider the following code: #include int main(int argc, char* argv[]) { enum Colors { red, blue, white = 5, yellow, green, pink }; Colors color = green; printf('%d', color); return 0; } What will be the output when the above code is compiled and executed?

C++ MCQs

Consider the following code:
#include<stdio.h>
int main(int argc, char* argv[])
{
enum Colors
{
red,
blue,
white = 5,
yellow,
green,
pink
};
Colors color = green;
printf("%d", color);
return 0;
}
What will be the output when the above code is compiled and executed?

Answer

Correct Answer: 7

Explanation:

Note: This Question is unanswered, help us to find answer for this one

C++ Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

C++ Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it