Sunday, 27 October 2013

C# Interview Questions and Answers for Freshers and Exp


1.What is C#?
 
  • C# (pronounced "C sharp") is a simple, modern, object-oriented, and type-safe programming language.
  • It will immediately be familiar to C and C++ programmers.
  • C# combines the high productivity of Rapid Application Development (RAD) languages.
2.What are the namespaces used in C#.NET?
 
    Namespace is a logical grouping of class.
  • using System;
  • using System.Collections.Generic;
  • using System.Windows.Forms;
3.What are the different categories of inheritance?
 
    Inheritance in Object Oriented Programming is of four types:
  • Single inheritance : Contains one base class and one derived class.
  • Hierarchical inheritance : Contains one base class and multiple derived classes of the same base class.
  • Multilevel inheritance : Contains a class derived from a derived class.
  • Multiple inheritance : Contains several base classes and a derived class.
4.What are the basic concepts of object oriented programming?
 
    It is necessary to understand some of the concepts used extensively in object oriented programming.These include
  • Objects
  • Classes
  • Data abstraction and encapsulation
  • Inheritance
  • Polymorphism
  • Dynamic Binding
  • Message passing.
5.Can you inherit multiple interfaces?
 Yes. Multiple interfaces may be inherited in C#.
6.What is inheritance?
 Inheritance is deriving the new class from the already existing one.
7.Define scope?
 Scope refers to the region of code in which a variable may be accessed.



8.What is the difference between public, static and void?
 
  • public :The keyword public is an access modifier that tells the C# compiler that the Main method is accessible by anyone.
  • static :The keyword static declares that the Main method is a global one and can be called without creating an instance of the class. The compiler stores the address of the method as the entry point and uses this information to begin execution before any objects are created.
  • void : The keyword void is a type modifier that states that the Main method does not return any value.
9.What are the modifiers in C#?
 
  • Abstract
  • Sealed
  • Virtual
  • Const
  • Event
  • Extern
  • Override
  • Readonly
  • Static
  • New
10.What are the types of access modifiers in C#?
 
    Access modifiers in C# are :
  • public
  • protect
  • private
  • internal
  • internal protect
10.What are the characteristics of C#?
 
    There are several characteristics of C# are :
  • Simple
  • Type safe
  • Flexible
  • Object oriented
  • Compatible
  • Consistent
  • Interoperable
  • Modern
11.What are the types of comment in C#?
 
    There are 3 types of comments in C#.
  • Single line (//)
  • Multi (/* */)
  • Page/XML Comments (///).








4 comments:

  1. Nice Collection of Question you have for getting more interview question you can refer this link
    c# interview questions

    ReplyDelete
    Replies
    1. https://www.facebook.com/Vamsidotnetstudio

      Delete
  2. More Interview questions and answers

    http://net-informations.com/faq/default.htm

    Ling

    ReplyDelete
  3. What is the difference between constant, readonly and static in C#? https://lnkd.in/eSReStq

    ReplyDelete

Receive All Free Updates Via Facebook.