C SHARP interview questions part 6

C SHARP interview questions part 6

Take as many assements as you can to improve your validate your skill rating

Total Questions: 20

1. Which among the following is NOT an exception?

Correct Answer is : zy

2. Which among the following is considered as .NET Exception class?

Correct Answer is : -1

3. Which of the following is the object oriented way to handle run time errors?

Correct Answer is : 60, 144

4. Select the statements which describe the correct usage of exception handling over conventional error handling approaches?

Correct Answer is : 45481

5. Choose the correct output for the given set of code: static void Main(string[] args) { try { Console.WriteLine("csharp" + " " + 1/Convert.ToInt32(0)); } catch(ArithmeticException e) { Console.WriteLine("Java"); } Console.ReadLine(); }

Correct Answer is : constructor 2: 6

6. Which of the following is the wrong statement about exception handling in C#.NET?

Correct Answer is : hello bye

7. Choose the correct output for given set of code: class Program { static void Main(string[] args) { try { Console.WriteLine("csharp" + " " + 1/0); } finally { Console.WriteLine("Java"); } Console.ReadLine(); } }

Correct Answer is : 144, 26, 4

8. Which procedure among the following should be used to implement a ‘Has a’ or a ‘Kind of’ relationship between two entities?

Correct Answer is : Base

9. The number of levels of inheritance are?

Correct Answer is : Polymorphism

10. What does the following code signify? class a {    } class b : a { variable declaration; method declaration; }

Correct Answer is : Overloaded constructors can have different type of number of arguments as well as differ in number of arguments

11. In an inheritance chain through which of following, the base class and its components are accessible to the derived class?

Correct Answer is : 45514

12. Select the class visibility modifiers among the following :

Correct Answer is : 25

13. In Inheritance concept, which of the following members of base class are accessible to derived class members?

Correct Answer is : Any number

14. Given class sample is inherited by class sample 1. Which are the correct statements about construction of object of class sample?

Correct Answer is : public maths(int pp, single tt)

15. If no access modifier for a class is specified,then class accessibility is defined as?

Correct Answer is : abc s2 = new abc(1, 1.4f);

16. Which of the following is not a namespace in the .NET Framework Class Library?

Correct Answer is : All of the mentioned

17. Which is the correct statement about the namespaces in C#.NET?

Correct Answer is : initialize the objects

18. Which among the following does not belong to the C#.NET namespace?

Correct Answer is : A constructor can be a static constructor

19. Which among the following is a correct statement about namespace used in C#.NET?

Correct Answer is : first method

20. Which among the given is not a correct way to call the method Issue() defined in the code snippet given below? class Book{ public void issue() { /* code */ }}class Journel{ public void issue() { /* code */ }}

Correct Answer is : none of the mentioned

Similar Interview Questions

    Search for latest jobs

    Icon
    Icon