155k views
2 votes
What is the output of the following statement?

cout << 4 * (15 / (1 + 3)) << endl;

A.
15

B.
12

C.
63

D.
72

1 Answer

1 vote

Correct option is (B) that is 12.

Step-by-step explanation:

In the given equation 4 * (15 / (1 + 3)), first it will calculate the inner most

bracket i.e (1+3) which equal to 4. then 15 is divided by 4 and give 3. After that

4 is multiplied by 3 and give 12. In this way the whole expression is calculated

and print 12 as output.

User Silentsurfer
by
8.5k points