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 problems might the following macro bring to the application?
Should a constructor be public or private?
Would you rather wait for quicksort, linear search, or bubble sort on a 200000 element array? (Or go to lunch...) a) Quicksort b) Linear Search c) Bubble Sort
What is the difference between structure and class?
What is the use of bit fields in structure declaration?
Can turbo c++ run c program?
What is the insertion operator and what does it do?
Is c++ a dying language?
What is polymorphism & list its types in c++?
What is static class data?
What is split a string in c++?
What is the difference between #import and #include?
How many keywords are used in c++?
Will a catch statement catch a derived exception if it is looking for the base class?
What is the auto keyword good for in c++?