Home / CSE MCQs / C#.Net MCQs :: Discussion

Discussion :: C#.Net MCQs

  1. 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();
     }
  2. A.
    Hello Bye"
    B.
    HelloBye"
    C.
    Hello Bye
    D.
    HelloBye

    View Answer

    Workspace

    Answer : Option D

    Explanation :

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


Be The First To Comment