InterviewSolution
Saved Bookmarks
| 1. |
The following is a segment of program: x = 1 ; y = 1; if(n>0) { x=x+1; y=y-1; } What will be the value of x and y, if n assumes a value (i) 1 (ii) 0 ? |
|
Answer» If the value of n assumes to be 1 then the value of x will be 2 and y will be 0; If the value of n assumes to be 0 then the value of x will be 1 and y will be 1; |
|