Chapter - 9: Arrays

What would happen if you assign a value to an element of an array whose subscript exceeds the size of the array?


G
Sections
4
Exercises

A

B

C

D

E

F

G

H

I

J

K

L

1

2

3

4

5

6

7

1. the element will be set to 0
2. nothing, it’s done all the time
3. other data may be overwritten
4. error message from the compiler 


Ans: 2. nothing, it's done all the time.


© 2020 Garbage Valuegarbage value logo