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 is the exit function in c++?
Differences between private, protected and public and give examples.
How many types of modularization are there in c++?
Which is most difficult programming language?
Explain one method to process an entire string as one unit?
Can constructor be static in c++?
How do I run a program in notepad ++?
What is virtual destructor ans explain its use?
What are friend classes? What are advantages of using friend classes?
What is scope in c++ with example?
Why can templates only be implemented in the header file?
What are associate containers?
What is unary operator? List out the different operators involved in the unary operator.
What is the use of seekg in c++?
Differentiate between a pointer and a reference with respect to c++.