Question

Consider the following C++ code:     int a = 5;     int b = 10;     if (a > 0 && b < 10) {         a = a + b;     } else if (a == 5 || b == 10) {         a = b - a;     } else {         a = 0;     }     // What is the value of 'a' after the execution of this code?

B 5
C 10
D 15
E -5
Practice Next

Hey! Ask a query