Sail E0 Webinar
Question


What is the output of this program?


1.
#include
2.
using namespace std;
3.
int main()
4.
{
5.
typedef int num;
6.
num a = 10, b = 15;
7.
num c = a + b + a - b;
8.
cout
Options:
A .  20
B .  15
C .  30
D .  25
Answer: Option A

In this program, we are manipulating the numbers and printing the result using user-defined 

data types.
Output:
$ g++ user.cpp
$ a.out
20



Was this answer helpful ?
Next Question

Submit Solution

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

Latest Videos

Latest Test Papers