Discussion
In a C program constant is defined
Answer: C
Correct answer: anywhere, but starting on a new line
The question concerns a #define constant, which is a preprocessor directive. A directive may appear anywhere in the file - before main, after it, or between functions - but it must begin on its own line, since the preprocessor works line by line and a directive is recognised by the # being the first non-whitespace token on the line.
Its effect runs from the point of definition to the end of the file, or until an #undef. By convention such definitions are placed near the top, where a reader will find them.
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