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
Hindi,
2 months ago
English,
2 months ago
English,
2 months ago
Math,
5 months ago
English,
5 months ago
India Languages,
11 months ago
Math,
11 months ago
Social Sciences,
11 months ago