Discussion
Pick the incorrect statement with respect to enums.
Answer: A
Correct answer: Two enum symbols cannot have the same value
The false statement is that two enumerators cannot share a value: they can. enum {a = 1, b = 1}; is perfectly legal, and it is sometimes useful for giving one constant two names. The other three are true: enumerator values must be integer constant expressions, they cannot be assigned to at run time, and any you leave unspecified are filled in automatically, continuing from the last value given.
No comment is present. Be the first to comment.
Loading…
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development