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

Is c++ low level?

582


What is insertion sorting?

671


Why was c++ created?

560


Write a program in c++ to print the numbers from n to n2 except 5 and its multiples

2041


What are the stages in the development cycle?

577






Write a program to add three numbers in C++ utilizing classes.

627


Is c++ vector dynamic?

574


What is an adaptor class in c++?

608


What is dev c++ used for?

607


Why is the function main() special?

631


Are iterators pointers?

681


List different attributes in C++?

644


Can we use struct in c++?

597


What are pointer-to-members in C++? Give their syntax.

620


Write a recursive program to calculate factorial in c++.

611