Home / MCQ Bank / Computer
Computer Control Flow Statements In C Sharp

What will be the output of the following C# code? static void Main(string[] args) { long x; x = Convert.ToInt32(Console.ReadLine()); do { Console.WriteLine(x % 10); }while ((x = x / 10) != 0); Console.ReadLine(); } enter x = 1234.

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option C • prints reverse of x

Related Computer Questions

Which Ruby convention is commonly used for naming variables and method parameters? How do you specifically execute a command in JavaScript? Which of the following are Content Management and publishing system based on Cocoon? It is a query that when run displays its own dialog box prompting you for information, such as What will be the output of the following C# code snippet? class Program { static void Main(string[] args) { float x = 3.14F; int y = (int)Math.Abs(x); Console.WriteLine(y); Console.ReadLine(); } }