What are the values of x y and z after executing the followi
Solution
Answer: 3)
X=4
Y=6
Z=5
If( )
If()
Statement;
Else If()
Statement;
Is same as
If( )
{
If()
Statement;
Else {
If()
Statement;
}
}
Answer : 4)
3 9 13 is the output
Explaination :
If( statement1 || statement2) In this if anyone of statements is true then if() is executed
Soo first one executes
Then... CTR=0 initially.. While (CTR<3) { CTR++; B++; } Means loop executes 3 times
Soo CTR=3 b=9
Do while(); Here after printing CTR+a=3+10=13 value it checks for the condition while(CTR<3) Soo false loop terminated
