Sail E0 Webinar
Question


What is the output of this program?


1.
#include
2.
using namespace std;
3.
void print (char * a)
4.
{
5.
cout
Options:
A .  Hello world
B .  Hello
C .  world
D .  compile time error
Answer: Option A

In this program we used the concept of constant casting to cast the variable and printing it.
Output:
$ g++ ref2.cpp
$ a.out
Hello world



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers