S

Shivam • 8.86K Points
Tutor III

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

Code:
static void Main(string[] args)
 {
     char c = 'g';
     string s = c.ToString();
     string s1 = "I am a human being" + c;
     Console.WriteLine(s1);
     Console.ReadLine();
 }
  • (A) I am a human bein c
  • (B) I am a human being
  • (C) I am a human being c
  • (D) I am a human bein
  • Correct Answer - Option(B)
  • Views: 114
  • Filed under category C#

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.

Related MCQs on C#

Q. Which of the following is true about dispose() method?

Q. A____block enclose the code that could throw an exception.

Q. Which array property is used to get the total number of elements in C#?

Q. Which of the following are examples of relational database management systems?

Q. Which of the following statements are correct? 1. Instance members of a class can be accessed only through an object of that class. 2. A class can contain only instance data and instance member function. 3. All objects created from a class will occupy equal number of bytes in memory. 4. A class can contain Friend functions. 5. A class is a blueprint or a template according to which objects are created.

Q. For two strings s1 and s2 to be equal, which is the correct way to find if the contents of two strings are equal?

Q. Which of the following can be facilitated by the Inheritance mechanism? 1 Use the existing functionality of base class. 2 Overrride the existing functionality of base class. 3 Implement new functionality in the derived class. 4 Implement polymorphic behaviour. 5 Implement containership.

Q. Select appropriate difference between decimal, float and double data type in C#? i) Float and Double are floating binary point types while decimal is a floating decimal point type. ii) Precision difference for float is '7' digit for double is '15' to '16' digit and for decimal is '28' to '29' digits. iii) Some values which cannot be exactly represented hence for those values float and double are more appropriate.

Q. In order for a class to use an interface, it must

Q. Which of the following assemblies can be stored in Global Assembly Cache?

Learn All C# MCQs


Question analytics