Vidyalelo
C++ Programming · Q8

Arrays and Strings in C++

Programming · C++ Programming · question 8

Q8

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

A.
H
B.
o
C.
Undefined behavior
Answer
D.
Compilation error

Answer: Option C

Solution

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