×

Multiple-Choice Questions

Web Technologies MCQs

Computer Science Subjects MCQs

Databases MCQs

Programming MCQs

Testing Software MCQs

Digital Marketing Subjects MCQs

Cloud Computing Softwares MCQs

AI/ML Subjects MCQs

Engineering Subjects MCQs

Office Related Programs MCQs

Management MCQs

More

What will be the output of the following C# code? | Question 15

62. What will be the output of the following C# code?

using System;

namespace MyApplication {
  class Program {
    static void Main(string[] args) {
      string[] mobiles = { "iPhone", "Samsung", "Vivo"};
      Console.WriteLine(mobiles);
    }
  }
}
  1. "iPhone", "Samsung", "Vivo"
  2. {"iPhone", "Samsung", "Vivo"}
  3. string[]
  4. System.String[]

Answer: D) System.String[]

Explanation:

In the above code, the statement Console.WriteLine(mobiles); will print the type of the variable that is System.String[].

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.