7 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 144
Correct 22
Incorrect 42
Viewed 80

Answers

Guest
Guest
s g m
s g m - 4 years ago

s g m from Solapur, India is saying The array size would appropriately grow. is correct answer

naveen kalusalingam
naveen kalusalingam - 4 years ago

naveen kalusalingam from Chennai, India is saying The compiler would report an error. is correct answer

Muthu Kumar
Muthu Kumar - 4 years ago

Muthu Kumar from Chennai, India is saying The compiler would report an error. is correct answer

Shuvam sinha
Shuvam sinha - 4 years ago

Shuvam sinha from Berhampur, India is saying The element will be set to 0. is correct answer

Sofia Fadzil
Sofia Fadzil - 4 years ago

Sofia Fadzil from Kuala Lumpur, Malaysia 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