Logo 
Search:

C++ Programming FAQ

Submit Interview FAQ
Home » Interview FAQ » C++ ProgrammingRSS Feeds

What will be the output of the mentioned code 6?

  Shared By: Shruti Sharma    Date: Dec 15    Category: C++ Programming    Views: 838

Answer:

Consider the following code snippet:

char *a,b;
if(typeid(a)==typeid(b))
cout<<"a";
else
cout<<"b";

What will be the output of the above code?

Options

a) b
b) a
c) Compilation error
d) No output

Answer : a) b

Share: 
 

Didn't find what you were looking for? Find more on What will be the output of the mentioned code 6? Or get search suggestion and latest updates.


Your Comment
  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].


Tagged: