Computer Science, asked by prateekror31, 5 months ago

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 Anonymous
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