1. The capability of an object in C# to take number of different forms and hence display behaviour as according is known as?
Explanation: Polymorphism allows a class to have multiple implementations with the same name. It is one of the core principles of Object Oriented Programming.
Report for correction2. Which of the following is not a valid data type in C#?
Explanation: The number is not a valid data type in C#.
Report for correction4. Which keyword is used to handle exceptions in C#?
Explanation: To handle exceptions 'catch' block is used.
Report for correction5. In C#; which keyword is used to declare a class?
Explanation: The keyword used in C# to declare a class is 'class'.
Report for correction6. When a value type is converted to object type; it is called as what?
Explanation: When a value type is converted to object type; it is called as boxing.
Report for correction7. When a object type is converted to value type; it is called as what?
Explanation: When a object type is converted to value type; it is called as Unboxing.
Report for correction8. Which C# keyword is used to create an instance of a class?
Explanation: The keyword used to create an instance of a class in C# is 'new'.
Report for correction9. Which data type is used to store whole numbers in C#?
Explanation: To store whole numbers in C# int datatype is used.
Report for correction10. Which C# loop construct is used to iterate through an array or collection?
Explanation: The foreach loop in C# iterates items in a collection; like an array or a list.
Report for correction11. What is the C# equivalent of the 'if' statement in C++?
Explanation: The C# equivalent of the 'if' statement in C++ is also 'if'.
Report for correction12. Which of the following keyword is used for including the namespaces in the program in C#?
Explanation: The keyword used for including the namespaces in the program of C# is 'using'.
Report for correction13. Which of the following functions return absolute value of a variable?
Explanation: To return the absolute value of a Decimal number Abs() function is used.
Report for correction14. Which access modifier makes a member accessible only within its own class?
Explanation: private access modifier makes a member accessible only within its own class.
Report for correction15. Which of these methods is a rounding function of Math class?
Explanation: To round up a variable to nearest integer; Round() method is used.
Report for correction16. Which of the following is the default access specifier of a class member function?
Explanation: Default access specifier for the class member function is Private.
Report for correction17. In C#; which access modifier is used to specify that a class member can only be accessed within its own class and derived classes?
Explanation: To allow a class member to be accessed within its own class and derived class 'protected' access modifier to be used.
Report for correction18. In C#; which access modifier is used to declare a class member that can be accessed only within its own class?
Explanation: To allow a class member to be accessed within its own class alone; 'private' access modifier to be used.
Report for correction19. Which C# access modifier provides the widest level of access?
Explanation: The public modifier has the widest scope. When a class or its members declared public they are accessible from everywhere.
Report for correction20. In C#; which keyword is used to define a class that cannot be instantiated and may only contain static members?
Explanation: When static keyword is used in a class; the compiler will guarantee that instances of this class cannot be created.
Report for correction21. Which of the following is NOT a primitive data type in C#?
Explanation: All others are primitive data type; where as string is non primitive data type.
Report for correction22. Which of the following is not a namespace in the .NET Framework Class Library?
Explanation: Process class is part of System.Diagnostics namespace.
Report for correction23. Which of the following converts a type to a string in C#?
Explanation: The method which is used to convert a type to string is ToString().
Report for correction24. Which of the following is used to handle exceptions in C#?
Explanation: To handle exceptions in C#; Try-catch-finally block is used.
Report for correction25. Which of the following is a valid C# identifier?
Explanation: The valid C# identifier among these is class.
Report for correction