Sail E0 Webinar
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;     } }
Options:
A .  cquestionbank
B .  It will print nothing
C .  Compile time error
D .  Run time error
Answer: Option C


Keyword "break is not part of if-else statement.This keyword is used in case of loop or switch case statement.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers