?
What will be output if you will compile and execute the following c code?
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++);
}
#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++;
main.c:5:12: error: lvalue required as increment operand
i = max++;
Join the Discussion
Login to post a comment or share your explanation.
Login