Sail E0 Webinar
Question


What is the output of this program?


1.
#include
2.
using namespace std;
3.
int main()
4.
{
5.
int x = 9;
6.
int* p = &x;
7.
cout
Options:
A .  4
B .  2
C .  Depends on compiler
D .  none of the mentioned
Answer: Option C

The size of a datatype mainly depends on complier only.
Output:
$ g++ def3.cpp
$ a.out
4



Was this answer helpful ?
Next Question

Submit Solution

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

Latest Videos

Latest Test Papers