-
What will be the output of the following C code?
#include <stdio.h>
typedef struct Employee
{
char *ch;
}Employ;
void main()
{
Employ emp;
emp.ch = "Hello";
printf("%s", emp.ch);
}emp
-
- Hello
- Garbage value
- Compilation Error
- All of above
- None of these
Correct Option: C
Compilation Error
main.c:11:5: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ at end of input
}emp