×

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? | Questions 1

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

using System;

namespace MyApplication {
  class Program {
    static void Main(string[] args) {
      bool x = true;
      Console.Write(Convert.ToString(x));
    }
  }
}
  1. True
  2. true
  3. False
  4. false

Answer: A) True

Explanation:

In the above C# code, we are using Convert.ToString() method which converts bool to string. Thus, the output will be "True".

Comments and Discussions!

Load comments ↻






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