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

Discussion :: C#.Net MCQs

  1. Choose Output for the following set of code :

    static void Main(string[] args)
    {
        string s1 = "Hello" + " I " + "Love" + " ComputerScience ";
        Console.WriteLine(s1);
        Console.ReadLine();
    }
  2. A.
    HelloILoveComputerScience
    B.
    Hello I Love ComputerScience
    C.
    Compile time error
    D.
    Hello

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    Here '+' defined operator works as concatenation for strings. Output : Hello I Love ComputerScience.


Be The First To Comment