3. What will be the value of w after the following section of code executes:
int w = 4, q = 3;
if (q > 5)
if (w == 7)
w == 3;
else
if (w > 3)
w = 1;
else
w = 0;
A.0 B.1 C.2 D.3
4. What will be the value of b after the following section of code executes:
int a = 4, b = 0;
if (a > 10)
b = 3;
else if (a > 5)
b = 2;
else
b = 1;
A.1 B.2 C.3 D.4
6.What will the following code print?
int count = 2;
while(count < 5 ){
System.out.print( ++count + " ");
}
A.2 3 4 B.3 4 5 C.2 2 2 D.none of the above
3)
Ans-B) 1
4)
Ans - A) 1
6)
Ans- B) 3 4 5
Get Answers For Free
Most questions answered within 1 hours.