Vidyalelo
C++ Programming · Q34

Arrays and Strings in C++

Programming · C++ Programming · question 34

Q34

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

A.
Undefined behavior
B.
Compilation error
C.
Ho
Answer
D.
ello

Answer: Option C

Solution

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