adplus-dvertising
frame-decoration

Question

What is the output of this program?
    #include <stdio.h>
    using namespace std;
    int main()
    {
        char str[5] = "ABC";
        cout << str[3];
        cout << str;
        return 0;
    }

a.

ABC

b.

ABCD

c.

AB

d.

None of the mentioned

Answer: (a).ABC

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of this program?