We are providing online training of realtime Live project on Asp.Net MVC with Angular and Web API. For more information click here. If you have any query then drop the messase in CONTACT FORM

Sunday, May 3, 2015

Interview questions and answers of OOP Concept in C#



1. What is the difference between Object-based programming and Object-oriented programming?

-if a language supports only encapsulation then it is called as object-based programming language ex: vb
-if a language supports encapsulation, inheritance, and polymorphism then it is called an object-oriented programming language.
ex:c#,java,c++

2. What are the main concepts of oops?

3.what is encapsulation and its advantage?

4.what is Data hiding?

5.what is abstraction?

6.what is the difference between data hiding and abstraction?

7.what is the difference between encapsulation and class?

8. How to implement encapsulation in C#?

9.what are the access specifies?

10.what is the behavior of protected internal?

11.what is an object?

12.what is min size of the object if there is no member in class?

13.what is the default access modifier for class?

14.what is the default access modifier for members in class?

15.what is the base class for all classes in .net?

16.what is the difference between class and structure?

17. Is it possible to define method in enum type?

18. How to initialize object?

19.what are accessor and mutator methods?

20.what is the difference between property and indexer?

21.is it possible to define property as static?

22.is it possible to define indexer as static?

23.what is the use of base keyword?

24.What is Constructor?

25.Why the name of the constructor and class name must be the same?

26.Why return type is not allowed for constructor at the programmer level?

27.What are the different types of constructors available?

28.Explain static constructor?

29.when the static constructor is invoked?

30.is it possible to overload static constructor?

31.what is the need for a copy constructor?

32.what is destructor and when is it invoked?

33.what is a disadvantage of destructor?

34.when the class is loaded into AppDomain?

35.How to invoke base class constructor in Derived class constructor?

36.what is namespace?

37.can we apply the access modifier to a namespace?

38.Is it possible to declare instance variables in a namespace?

39.what is alias name for the namespace and when is it required?

40.what is the difference between namespace and class?

41.what is the difference between out and ref parameters?

42.what is the purpose of params keyword?

43.what is binding?

44 . How many types of bindings are available?

45.what is Method overloading?

46.what is Method overriding?

47. What is the type of()

48.what is polymorphism?

49.what are the types of polymorphism?

50.what is the difference between abstract class and interface?

51.Can we apply private or protected access modifier to interface?

52.why access modifiers can not be applied to members of interface?

53.why object can not be created for abstract class or interface?

54.can we declare member of interface as static?

55.why multiple inheritance is not possible for classes?

56.what is private implementation for interface member?

57.what is sealed class?

58.what is Extension method and how to define it?

59.Can we Overload destructor?

60.what is the use of Dispose()

61.what is the difference between String and StringBuilder classes?

62.what is the advantage of var keyword?

63.Can we assign null to var type of variable?

64.What is the purpose of checked and unchecked blocks?

65.what is the difference between the abstract method and the virtual method?

66. Can we define a virtual method as a private member?

67.can we define an abstract method as a private member?

68. Can we define an abstract method as static?

69. Can we declare a private class in a namespace?

70.what is the difference between new and override keywords?

71. Can we Create an object with out defining class?

72. What is the purpose of this?

73.what is the difference between Array and ArrayList?

74. What is the difference between List and ArrayList?

75.what is the difference between Hashtable and SortedList?

76.what is assembly?

77. Is IL language is OOP?

78.what are different types of assemblies?

79. What is the digital signature of an assembly?

80.what is a PE file?

81.what is ilasm.exe?

82. What is ILDASM.exe?

83. What are the advantages of generics?

84.What is boxing and unboxing?

85. What are the disadvantages of boxing and unboxing?

86.what is a delegate?

87.what are different types of delegates?

88.what is a lamda expression?

89. What are the different types of lambda expressions?

90. What is the Annynomous method?

91.what is dll hell problem?

92.explain different parts of the assembly version?

No comments: