-
What will be the output of the following C code?
#include <stdio.h>
struct Employee
{
char *ch;
struct Employee *point;
};
void main()
{
struct Employee e1;
struct Employee *e2 = &e1;
printf("%d", sizeof(Employee));
}
-
- Undefined behaviour
- Nothing
- Garbage value
- Compilation Error
- None of these
Correct Option: D
Compilation Error
main.c: In function ‘main’:
main.c:11:29: error: ‘Employee’ undeclared (first use in this function)
printf("%d", sizeof(Employee));
^~~~~~~~
main.c:11:29: note: each undeclared identifier is reported only once for each function it appears in