Sail E0 Webinar
Question


What is the output of this program?


1.
#include
2.
using namespace std;
3.
int main()
4.
{
5.
int a = 20;
6.
int b = 10;
7.
int c = 15;
8.
int d = 5;
9.
int e;
10.
e = a + b * c / d;
11.
cout
Options:
A .  50
B .  60
C .  70
D .  90
Answer: Option A

Explanation:In this program, the value e is evaluated by precedence ad we got the output as 50.
Output:
$ g++ ess4.cpp
$ a.out
50


Was this answer helpful ?
Next Question

Submit Solution

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

Latest Videos

Latest Test Papers