ExamVeda
Login
Home
This question belongs to C Program C Preprocessor
C Preprocessor
?

What will be output if you will compile and execute the following c code?
#include<stdio.h>
#define max 5
void main(){
    int i = 0;
    i = max++;
    printf("%d", i++);
}

Answer & Solution
Correct Answer: Option E
main.c: In function ‘main’:
main.c:5:12: error: lvalue required as increment operand
i = max++;
Examveda
Question posted by Examveda
Community

Join the Discussion

5 Comments
G Saravana
G Saravana 9 years ago
to see header file....statement missing
Benito Paul
Benito Paul 9 years ago
oh great @ Tej Deep
Umang Mahant
Umang Mahant 9 years ago
omg!!
Tej Deep
Tej Deep 10 years ago
Error in the inclusion of header file will throw an error. Look carefully, after #include nothing is mentioned
Nikhil Agarwal
Nikhil Agarwal 11 years ago
cause header file name missing