adplus-dvertising
frame-decoration

Question

Select output for the following set of code :
static void Main(string[] args)
 {
     int i = 1, j = 2, k = 3;
     do
     {
         Console.WriteLine((Convert.ToBoolean(Convert.ToInt32(i++))) && (Convert.ToBoolean(Convert.ToInt32(++j))));
     }while (i <= 3);
     Console.ReadLine();
 }

a.

0 0 0

b.

True True True

c.

1 1 1

d.

False False False

Posted under C# programming

Answer: (b).True True True

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Select output for the following set of code :