adplus-dvertising
frame-decoration

Question

What is the output for the following code ?
static void Main(string[] args)
 {
     int a = 15, b = 10, c = 1;
     if (Convert.ToBoolean(a) && (b > c))
     {
         Console.WriteLine("cquestionbank");
     }
     else
     {
         break;
     }
 }

a.

cquestionbank

b.

It will print nothing

c.

Compile time error

d.

Run time error

Answer: (c).Compile time error

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output for the following code ?