Vidyalelo
C# Programming · Q53

Control Flow Statements in C Sharp

Programming · C# Programming · question 53

Q53

What will be the output of the following C# code? static void Main(string[] args) int i; Console.WriteLine("enter value of i:"); i = Convert.ToInt32(Console.ReadLine()); if ( i % 2 == 0) goto even: else Console.WriteLine("number is odd:"); Console.ReadLine(); even: Console.WriteLine("number is even:"); Console.ReadLine(); for i = 4.

A.
number is odd
B.
number is even
C.
Compile time error
Answer
D.
none of the mentioned

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board