Computer Science, asked by desaianish351, 2 months ago

13. Consider the following program segment.
x = 10; y = 5;
if(x>y) w= 15;
w= 25
cout<<" value of w is ";
cout<< w;
find the output.
pls give the answer​

Answers

Answered by imntshvrma
5

Answer:

output : value of w is 25

Explanation:

when if clause is executed if(x>y) it results in true so therefore w =15 is assigned but next statement is w=25 which is executed next.

so w will hold 25 and hence the output is 25.

Similar questions