-
What is the output of this program?
#include
using namespace std;
void print (char * str)
{
cout << str << endl;
}
int main ()
{
const char * str = "Interview Mania";
print(const_cast(str) );
return 0;
}
-
- Interview
- Mania
- Interview Mania
- All of above
- None of these
Correct Option: C
In this program we used the concept of constant casting to cast the variable and printing it.