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
Define pre-condition and post-condition to a member function in c++?
why and when we can declar member fuction as a private in the class?
What is difference between class and structure in c++?
What are iterators in c++?
What are the advantages of prototyping?
What is the type of this pointer in c++?
Differentiate between a constructor and a method in C++.
What is size_type?
When you overload member functions, in what ways must they differ?
Define anonymous class.
what is Member Functions in Classes?
What is ifstream c++?
What is a set in c++?
Can you explicitly call a destructor on a local variable?
Define a pointer to a data member of the type pointer to pointer?