Vidyalelo
C++ Programming · Q30

Arrays and Strings in C++

Programming · C++ Programming · question 30

Q30

What is the correct way to access the last element of an array named arr in C++?

A.
arr[end]
B.
arr[-1]
C.
arr[size]
D.
arr[size - 1]
Answer

Answer: Option D

Solution

Answer: Option D
No explanation is given for this question Let's Discuss on Board