What will be the output of the following C code? (If the name entered is: Sanfoundry)
#include
#include
typedef struct employee
{
char name[50];
int salary;
} e1;
void main( )
{
printf("Enter Employee name");
scanf("%s",e1.name);
printf("\n%s",e1.name);
}
Answer: D
The code shown above will result in an error because we have used the data type e1 (defined using the keyword typedef) in the form of an identifier.