Thoroughly discuss and answer the following questions. Copy the questions to your submission and answer them underneath each question.
1.What is the difference between an array’s size declarator and a subscript?
2.What is “array bounds checking”? Does C++ perform it?
3.When an array name is passed to a function, what is actually being passed?
1)
Subscript is used to access array elements for
example: arr[0]
Array size declarator is used to define the size
of array at the time of decleration i.e the number of elements the
array will hold.
2) C++ does not perform arrayBound
Checking.
array bounds checking is a check that prevent the program to access
beyond the bounds of array. This support is provided by some
language but not C++
3) The Base Address of the array.
Thanks, PLEASE COMMENT if there is any concern. PLEASE UPVOTE
Get Answers For Free
Most questions answered within 1 hours.