-
What will be the output of the following C code?
#include <stdio.h>
void main()
{
char p = 'p';
int q = (p % 10)++;
printf("%d\n", q);
}
-
- 10
- Compilation Error
- p
- Runtime Error
- None of these
Correct Option: B
Compilation Error
main.c: In function ‘main’:
main.c:5:25: error: lvalue required as increment operand
int q = (p % 10)++;