Computer Science, asked by gopikagp2002, 1 year ago

If (val>0)
cout< else
cout<< --val;
1.what will be the output of the code if the initial value of val will be 10?
2.what will be the output of the code if the initial value of val is -2?
pls answer if u know

Answers

Answered by charlie1505
1

Answer:

If your code like

if(val>0)

cout<<val;

else

cout<<--val;

output will be

1) val=10

2) val=-1

Similar questions