Sail E0 Webinar
Question
What will be the output for the given set of code?
static void Main(string[] args) {     String c = "Hello";     String a = c + "Bye";     Console.WriteLine(a);     Console.ReadLine(); }
Options:
A .  Hello Bye"
B .  HelloBye"
C .  Hello Bye
D .  HelloBye
Answer: Option D


'+' operator method works in the form of concatenate method() and hence is used to join two strings together.
Output : HelloBye



Was this answer helpful ?
Next Question

Submit Solution

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

Latest Videos

Latest Test Papers