R
Q. What will be the output of the following C# code, if the input is 123?
Code:
using System;
namespace MyApplication {
class Program {
static void Main(string[] args) {
Console.WriteLine("Enter a number:");
int num = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Given number is: " + num);
}
}
}
namespace MyApplication {
class Program {
static void Main(string[] args) {
Console.WriteLine("Enter a number:");
int num = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Given number is: " + num);
}
}
}
- Correct Answer - Option(B)
- Views: 243
- Filed under category C#
Discusssion
Login to discuss.