What is the output of this program?
#include
int main(){
struct simp
{
int i = 6;
char city[] = "chennai";
};
struct simp s1;
printf("%d",s1.city);
printf("%d", s1.i);
return 0;
}
Answer: D
Compilation Error: Cannot initialize a class member here When we declared members in struture, it just tells the compiler about their presence. There is no memory allocated for that members. So we can't intialize structure members.