Question: What will be printed after executing the following C++ code? int a=2, b=4, c=6, d=-5 ; if (c > 0) cout < < b *

What will be printed after executing the following C++ code?

int a=2, b=4, c=6, d=-5 ;

if (c > 0)

cout << b * c - d << endl;

else

cout << d - a * b << endl;

  1. -13

  2. 29

  3. 38

  4. 8

  5. NONE

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!