Home » C Programming » Preprocessors » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    void main()
    {
    #define min 56;
    printf("%d", min);
    }
    1. Depends on compiler
    2. 56
    3. Runtime Error
    4. Nothing
    5. Compilation Error
Correct Option: E

Compilation Error

main.c: In function ‘main’:
main.c:4:23: error: expected ‘)’ before ‘;’ token
#define min 56;
^
main.c:5:22: note: in expansion of macro ‘min’
printf("%d", min);



Your comments will be displayed only after manual approval.