Point out the error in the following program in GCC compiler?

Loading

Choose the correct option.

Point out the error in the following program in GCC compiler?

#include  
int main() {
struct emp {
char name[25];
int age;
};
struct emp e;
e.name = "Suresh";
e.age = 25;
printf("%s %d ", e.name, e.age);
return 0;
}

A. error: incompatible types when assigning to type ‘char[25]’ from type ‘char *’.
B. Error: invalid constant expression
C. Error: Rvalue required
D. No error, Output: Suresh 25

Leave a Comment