ProgrammingModerate

struct N { char name[8]; int score; }; struct N n = {"Ravi", 90}; printf("%c %d", n.name[1], n.score); What is printed?

  1. A. a 90
  2. B. R 90
  3. C. a 0
  4. D. i 90

Correct answer: A. a 90

name holds Ravi with its terminator, so name[1] is 'a', and the score is 90.

More C Programming questions

Exams that ask this topic