Write the output of the C 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; }
Answers
Answered by
2
Answer:
Compilation Error
Explanation:
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.
Similar questions
Math,
2 months ago
Social Sciences,
2 months ago
Math,
4 months ago
English,
4 months ago
India Languages,
10 months ago
Math,
10 months ago
Social Sciences,
10 months ago