ExamVeda
Login
Home
Control Flow Statements in C Sharp
?

What will be the output of the following C# code?
static void Main(string[] args)
{
    int n, r;
    n = Convert.ToInt32(Console.ReadLine());
    while (n > 0)
    {
        r = n % 10;
        n = n / 10;
        Console.WriteLine(+r);
    }
    Console.ReadLine();
}
for n = 5432.

Answer & Solution
Correct Answer: Option C
Let's discuss the solution. Join the discussion
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.