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

What is c++ in english?

575


Explain the difference between c & c++?

579


Write a program in C++ for Fibonacci series

655


How do you print a string on the printer?

571


Why is it called c++?

578






Name the operators that cannot be overloaded in C++?

583


How do I make turbo c++ full screen?

580


Should I learn c or c++ first?

563


Is turbo c++ free?

617


Difference between inline functions and macros?

594


How many characters are recognized by ANSI C++?

891


What is a singleton c++?

545


What is while loops?

613


Is c++ free?

579


How to get the current position of the file pointer?

551