adplus-dvertising
frame-decoration

Question

What is the output of this program?
    #include <iostream>
    using namespace std;
    int main(void)
    {
        const char *one = "Test";
        cout << one << endl;
        const char *two = one;
        cout << two << endl;
        return 0;
    }

a.

Test

b.

TestTest

c.

Te

d.

None of the mentioned

Answer: (b).TestTest

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of this program?

Similar Questions

Discover Related MCQs

Q. What is meant by garbage collection?

Q. What are the operators available in dynamic memory allocation?

Q. Which is used to solve the memory management problem in c++?

Q. Which is used to handle the exceptions in c++?

Q. Which type of program is recommended to include in try block?

Q. Which statement is used to catch all types of exceptions?

Q. How to handle error in the destructor?

Q. What kind of exceptions are available in c++?

Q. What is meant by exception specification?

Q. Identify the correct statement about throw(type).

Q. What will happen when a programs throws any other type of exception other than specified?

Q. What do you mean by “No exception specification”?

Q. Which operations don’t throw anything?

Q. What will happen when an exception is uncaught?

Q. Which handler is used to handle all types of exception?

Q. Which operator is used in catch-all handler?

Q. What function will be called when we have a uncaught exception?

Q. What will not be called when the terminate() is arised in constructor?

Q. What will happen when we move try block far away from catch block?

Q. What will happen if an excpetion that is thrown may causes a whole load of objects to go out of scope?