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 / dsp

address of a1 hello

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Differentiate between a constructor and a destructor in c++.

575


Is vector a class in c++?

599


What is a static member?

619


What methods can be overridden in java?

679


What is size_type?

551






what is C++ objects?

675


What is abstraction in c++?

684


write a corrected statement in c++ so that the statement will work properly. x = y = z + 3a;

1461


Is c++ a float?

606


What is rtti in c++?

629


What is fixed in c++?

588


What is flush () in c++?

584


Why was c++ created?

560


What do you mean by vtable and vptr in c++?

629


Define what is constructor?

590