Sail E0 Webinar
Question


What is the output of this program?


1.
#include
2.
using namespace std;
3.
#define SquareOf(x) x * x
4.
int main()
5.
{
6.
int x;
7.
cout
Options:
A .  16
B .  64
C .  compile time error
D .  none of the mentioned
Answer: Option D

In this program, as we haven't initiailzed the variable x, we will get a output of ending digit of 4.
Output:
$ g++ mac1.cpp
$ a.out
75386824




Was this answer helpful ?
Next Question

Submit Solution

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

Latest Videos

Latest Test Papers