Question
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
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
Answer: Option A
Was this answer helpful ?
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 ?
More Questions on This Topic :
Question 2.
What is the name of | operator?
....
Question 3.
What is the associativity of add(+);
....
Question 6.
What are the essential operators in c++?
....
Question 9.
Pick out the compound assignment statement.
....
Submit Solution