Top

Discussion

What is the output of this program?

#include 
struct result{
  char sub[20];
  int marks;
};
void main()
{
      struct result res[] = { {"Maths",100},
      {"Science",90},
      {"English",85}
      };
    printf("%s ", res[1].sub);
    printf("%d", (*(res+2)).marks);
}

 

  • A.Maths 100
  • B.Science 85
  • C.Science 90
  • D.Science 100

Answer: B

No answer description available for this question

No comment is present. Be the first to comment.
Loading…

Post your comment