ISRO Computer Science (CSE) 2015 - Question 69

All ISRO Computer Science (CSE) papers | ISRO Computer Science (CSE) 2015

If n has 3 values then the statement a[++n] = n++;

  • A. assigns 3 to a[5]
  • B. assigns 4 to a[5]
  • C. assigns 4 to a[4]
  • D. what is assigned is compiler dependent

Answer: D. what is assigned is compiler dependent

Explanation: Undefined behavior due to multiple unsequenced modifications.

| | All questions of ISRO Computer Science (CSE) 2015