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
What is the difference between public and private data members?
How many standards of c++ are there?
Explain operator overloading.
What are the extraction and insertion operators in c++?
How can you quickly find the number of elements stored in a dynamic array?
What is iterator c++?
what are the decision making statements in C++? Explain if statement with an example?
What is using namespace std in cpp?
What is diamond problem in c++?
Why is main function important?
Does c++ have string data type?
What is the word you will use when defining a function in base class to allow this function to be a polimorphic function?
What do you mean by const correctness?
What does it mean to declare a member function as static?
In a function declaration, what does extern mean?