1.

What will happen if in a C program you assign a value to an array element whose subscript exceeds the size of array?(a) The compiler would report an error(b) May stop working abruptly if data gets overwritten(c) None of the mentioned(d) The element will be set to 0I have been asked this question during an interview.The doubt is from Array Reference topic in division Syntax Directed Definition and Translations of Compiler

Answer»

The correct choice is (B) May stop working abruptly if data GETS overwritten

To EXPLAIN: It often happens that the PROGRAM crashes.



Discussion

No Comment Found

Related InterviewSolutions