What is output of program?
#include <iostream>
using namespace std;
void print (char * a)
{
cout << a << endl;
}
int main ()
{
const char * a = "Hello world";
print(const_cast<char *> (a) );
return 0;
}
a) Hello world
b) Hello
c) world
d) compile time error
Submitted by: AdministratorSubmitted by:
Read Online C++ References Job Interview Questions And Answers
Top C++ References Questions
☺ | What is reference variable? |
☺ | What is output of this program? |
☺ | What is a local reference? |
☺ | What are References in C++? |
Top C Plus Plus Language Categories
☺ | C++ Pointers & Functions Interview Questions. |
☺ | C++ Operator Overloading Interview Questions. |
☺ | C++ Exception Handling Interview Questions. |
☺ | C++ Virtual Functions Interview Questions. |
☺ | C++ Template Interview Questions. |