Question
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
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
Answer: Option A
Was this answer helpful ?
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 ?
Submit Solution