adplus-dvertising
frame-decoration

Question

What is the output of this program?
#include <stdio.h>
int main(){
   struct simp 
 {
  int i = 6;
  char city[] = "chennai";
 };
 struct simp s1;
 printf("%d",s1.city);
 printf("%d", s1.i);
    return 0;
}

a.

chennai 6

b.

Nothing will be displayed

c.

Runtime Error

d.

Compilation Error

Answer: (d).Compilation Error

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of this program?