-
What will be the output of the following C code?
#include <stdio.h>
void main()
{
char str[] = "WELCOME";
str++;
printf("%c\n", *str);
}
-
- Compilation Error
- W
- L
- Garbage value
- None of these
Correct Option: A
Compilation Error
main.c: In function ‘main’:
main.c:5:12: error: lvalue required as increment operand
str++;