Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

What will be the output of the following C# code?
static void Main(string[] args)
{
String name = “Dr.Gupta”;
Console.WriteLine(“Good Morning” + name);
}

What will be the output of the following C# code?
static void Main(string[] args)
{
String name = “Dr.Gupta”;
Console.WriteLine(“Good Morning” + name);
}
a) Dr.Gupta
b) Good Morning
c) Good Morning Dr.Gupta
d) Good Morning name

Answer: c
Explanation: How to initialize a string variable and concatenate string using ‘+’ operator.

Join The Discussion