Vidyalelo
C++ Programming · Q21

Arrays and Strings in C++

Programming · C++ Programming · question 21

Q21

What is the output of the following code snippet in C++? char str[] = "Hello"; cout << str[4];

A.
e
B.
o
Answer
C.
Undefined behavior
D.
l

Answer: Option B

Solution

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