0

Review the following code snippet:

int a=4; int b=1; if ( a>b) Console.WriteLine ("a"); Console.WriteLine("b"); What output will be displayed after this code snippet is executed? a. a b. b c. a b

11th Apr 2017, 8:48 PM
Hounaida
3 Réponses
+ 7
Alright, I reviewed it. Fyi, the answer is "ab"
11th Apr 2017, 9:52 PM
J.G.
J.G. - avatar
+ 5
As a>b is true, "a" is printed. Then, "b" is printed. So, the output is "ab".
12th Apr 2017, 4:55 AM
Krishna Teja Yeluripati
Krishna Teja Yeluripati - avatar
+ 2
int a=4; int b=1; if ( a>b) { Console.WriteLine ("a"); } Console.WriteLine("b"); as 4>1 then it print "a" after completing the if condition it print ”b" the answer is a b
12th Apr 2017, 5:04 AM
Vikas Sharma
Vikas Sharma - avatar