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 / pokala
world! world! is the right anwer.
Do not confuse with other asnwers.
Same is verified.
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What does int * mean in c++?
Do inline functions improve performance?
Define the process of error-handling in case of constructor failure?
Write about the role of c++ in the tradeoff of safety vs. Usability?
What is c++ namespace?
Define pointers?
Why is c++ awesome?
Write a Program for find and replace a character in a string.
What are associate containers?
What does override mean in c++?
Can non graphic characters be used and processed in C++?
Is linux written in c or c++?
Does there exist any way to make the command line arguments available to other functions without passing them as arguments to the function?
Difference between overloading vs. Overriding
What is &x in c++?