Essential Operators

Q.

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 << e << endl ;
12.
        return 0;
13.
    }
A. 50
B. 60
C. 70
D. 90

Answer : Option A

Explanation :

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