What will be the output of the following C++ code? #include<iostream>…

BPSC TRE 2023

What will be the output of the following C++ code? #include<iostream> #include<string> using namespace std; int main(int argc, char const *argv[ ]) { char s1[6]=“Hello”; char s2[6]=“World”; char s3[12]=s1+“ ”+s2; cout<<s3; return 0; }

  1. A.

    Hello

  2. B.

    World

  3. C.

    Error

  4. D.

    More than one of the above

  5. E.

    None of the above

Attempted by 281 students.

Sign up free to check your answer

Sign up free

Explore the full course: Rssb Senior Computer Instructor

Loading lesson…