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

Why use of template is better than a base class?

638


What is the use of setfill in c++?

576


Describe protected access specifiers?

668


Tell me what are static member functions?

605


What is c++ hiding?

613






what is the use of void main() in C++ language?

634


Describe the syntax of single inheritance in C++?

637


What are the four partitions in which c++ compiler divides the ram?

694


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

562


Will a C compiler always compile C++ code a) Yes b) No c) Only optimized compilers

606


Can a program run without main function?

611


What is the best book for c++ beginners?

564


What is an inclusion guard?

611


Mention the ways in which parameterized can be invoked.

532


What do nonglobal variables default to a) auto b) register c) static

637