What is the output of:

String a1 = "Hello";
String a2 = "world!";
String* s1 = &a2;
String& s2 = a1;
s1 = &a1;
s2 = a2;
std::cout << *s1 << " " << s2 << std::endl;

Answer Posted / saranya

Hello World

Is This Answer Correct ?    0 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is operator overloading in c++ example?

743


Do you know about latest advancements in C++ ?

754


What is struct c++?

649


Write some differences between an external iterator and an internal iterator?

677


What are the various operations performed on stack?

708






When the constructor of a base class calls a virtual function, why doesn't the override function of the derived class gets called?

689


Does c++ support exception handling?

697


What will the line of code below print out and why?

423


What are the basic data types used in c++?

658


What is the default width for ouputting a long integer using the insertion operator?

803


What is flush programming?

663


What is oop in c++?

688


What is function overloading c++?

664


What is a constructor in c++ with example?

670


what do you mean by volatile variable?

672