Sail E0 Webinar
Question
Select the output for given set of code:
static void Main(string[] args){    string s1 = "Hello" + "c" + "Sharp";    Console.WriteLine(s1);    Console.ReadLine();}
Options:
A .  Hello c Sharp
B .  HellocSharp
C .  Compile time error
D .  Hello
Answer: Option A


Here '+' operator works as concatenation for strings.
Output : Hello c Sharp



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers