5 years ago in C Arrays

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] The program may crash if some important data gets overwritten.
[C] The array size would appropriately grow.
[D] The element will be set to 0.
Loading...
Next Question

Overall Stats

Attempted 264
Correct 50
Incorrect 93
Viewed 121

Answers

Guest
Guest
wajid hussain
wajid hussain - 3 weeks ago

wajid hussain from Karachi, Pakistan is saying The program may crash if some important data gets overwritten. is correct answer

wajid hussain
wajid hussain - 3 weeks ago

wajid hussain from Karachi, Pakistan is saying The program may crash if some important data gets overwritten. is correct answer

Deep
Deep - 1 month ago

Deep from Kolkata, India is saying The element will be set to 0. is correct answer

indhuja indhuja
indhuja indhuja - 4 months ago

indhuja indhuja from Erode, India is saying The program may crash if some important data gets overwritten. is correct answer

Ruchitha ruchi
Ruchitha ruchi - 4 months ago

Ruchitha ruchi is saying The compiler would report an error. is correct answer

Related Questions

What does the following declaration mean? int (*ptr)[10];

  • [A] ptr is a pointer to an array of 10 integers
  • [B] ptr is array of pointers to 10 integers
  • [C] ptr is an array of 10 integers
  • [D] ptr is an pointer to array