Sail E0 Webinar
Question

What is the output of this program?

#include

using namespace std;

int main()

{

int a;

a = 5 + 3 * 5;

cout

Options:
A .  35
B .  20
C .  25
D .  30
Answer: Option B


Because the * operator is having highest precedence, So it is executed first and then the + operator will be executed.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers