C#

MCQsQuestion.com has 144 Question/Answers about Topic C#

Disadvantages of Explicit type conversion are that it

Disadvantages of Explicit type conversion are that it
  • A. makes program memory heavier
  • B. results in loss of data
  • C. is potentially Unsafe
  • D. is memory consuming
  • Correct Answer: Option B

When a class serves as base class for many derived classes, situation is called

When a class serves as base class for many derived classes, situation is called
  • A. polymorphism
  • B. hierarchical inheritance
  • C. hybrid inheritance
  • D. multipath inheritance
  • Correct Answer: Option B

Methods that are not supported for dynamic types are

Methods that are not supported for dynamic types are
  • A. Anonymous
  • B. static
  • C. abstract
  • D. extension
  • Correct Answer: Option D

Boolean comparison operators are also called

Boolean comparison operators are also called
  • A. Arithmetic Operators
  • B. Relational Operators
  • C. Bitwise Operators
  • D. Logical operators
  • Correct Answer: Option B

Choose correct output for following piece of code String s1 = “Abc”;

Choose correct output for following piece of code   String s1 = “Abc”; String s2; s2 = s1.insert(6, "Xyz"); Console.WriteLine(s2);
  • A. AbXyzc
  • B. Abc Xyz
  • C. Abc
  • D. AbcXyz
  • Correct Answer: Option D

Correct way to define a variable of type struct Emp declared below is struct Emp

Correct way to define a variable of type struct Emp declared below is   struct Emp { private String name; private int age; private Single sal; }
  • A. Emp e(); e = new Emp();
  • B. Emp e = new Emp;
  • C. Emp e = new Emp();
  • D. Emp e; e = new Emp;
  • Correct Answer: Option C

Difference between a while and a do while loop

Difference between a while and a do while loop
  • A. A while and a do while loop are same
  • B. A while loop works for discrete iterations
  • C. A do while loop is more efficient
  • D. Ado while loop always executes even if condition is false whereas a while loop only works with t
  • Correct Answer: Option D

Destruction of an object

Destruction of an object
  • A. cleans up memory
  • B. deletes class
  • C. un initializes object
  • D. Both b and c
  • Correct Answer: Option A

Which of following is correct way of implementing an interface addition by class maths

Which of following is correct way of implementing an interface addition by class maths
  • A. class maths : addition {}
  • B. class maths implements addition {}
  • C. class maths imports addition {}
  • D. class maths extends addition {}
  • Correct Answer: Option A

Branching works on comparison test based on different values based on

Branching works on comparison test based on different values based on
  • A. goto statement
  • B. boolean logic
  • C. branching does not do any comparisons
  • D. logical operators
  • Correct Answer: Option B

Which of following languages compile code to Common Intermediate Language(CIL) code as its first stage

Which of following languages compile code to Common Intermediate Language(CIL) code as its first stage
  • A. Assembly Language
  • B. .NET languages
  • C. PHP
  • D. Java
  • Correct Answer: Option B

To fully abstract a class from its implementation we use

To fully abstract a class from its implementation we use
  • A. objects
  • B. packages
  • C. interfaces
  • D. function definations
  • Correct Answer: Option C

converting a type to a 32-bit integer in C# uses

converting a type to a 32-bit integer in C# uses
  • A. ToInt32
  • B. ToDouble
  • C. ToDecimal
  • D. ToInt16
  • Correct Answer: Option A

A C# destructor does not satisfies which of following

A C# destructor does not satisfies which of following
  • A. A class can have one destructor only
  • B. Destructors cannot be inherited or overloaded
  • C. Destructors can have modifiers or parameters
  • D. Destructors cannot have modifiers or parameters
  • Correct Answer: Option C

A a valid skin code inside a skin file is

A a valid skin code inside a skin file is
  • A.
  • B.
  • C.
  • D.
  • Correct Answer: Option B
Page 1 of 1012345...10...Last »