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
declare an array of structure where the members of the structure are integer variable float variable integer array char variable access all elements of the structure using dot operator and this pointer operator
Difference between pointer to constant vs. Pointer constant
How does com provide language transparency?
What is c++ iterator?
What do you mean by a template?
What is new in c++?
How many types of comments are there in c++?
What is the main purpose of overloading operators?
What do you mean by vtable and vptr in c++?
Write a program to find the reverse Fibonacci series starting from N.
Write a program which is required to process the time of a clock in hours and minutes, entered from the keyboard. With this program, there are two requirements for any data entered by a user: 1. The data must be of the correct type (in this case, two ints). 2. The data must be in the correct range: this means that, for the minutes, negative numbers and any number above 59 must be rejected; for the hours, negative numbers and any number above 23 must be rejected. Output error message for invalid data input. Output the time one and a half hour after the time input. i.e. Hour: 22 Min: 32 One and a half hour after 22:32 is 00:02
Describe private, protected and public?
Is c++ free?
What does new return if there is insufficient memory to make your new object?
What is c strings syntax?