adplus-dvertising
frame-decoration

Question

What is the output of this program?
#include <stdio.h>
struct student
{
  int no = 5;
  char name[20];
};
void main()
{
  struct student s;
  s.no = 8;
  printf("hello");
}

a.

Nothing

b.

Compile time error

c.

hello

d.

Varies

Answer: (b).Compile time 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?