Você está na página 1de 3

Student id :

Student Name :

Q1. Select the correct answers


a) Multiple inheritance is allowed in .NET for Interfaces
b) Multiple inheritance is allowed in .NET for Classes
c) Both a) and b)
d) None

Q2.What is the meaning of ‘Solution’ in Visual Studio


a) A single solution can contain multiple projects
b) Each solution can contain only one project
c) Solution is logical grouping for projects
d) Two solutions can share their source files

Q3 What different type of projects you can create with C#.net in visual Studio?
a) Console Application
b) Windows Form application
c) Shared Class
d) Web service
e) Web application

Q4. Fill in the blanks


a)The concept in .NET by which one can provide a new implementation for the
base class member without overriding the member is called as ____________

b)When a derived class object is assigned to a base class variable the


Derived class Function gets called in case of __________________
e) Can we use break to exit a for loop inside method : yes / No
f) Classes from which ‘namespace’ will have to be used to SQL Connections

Q5.Write the short answers in your own language


a) What is the purpose of using statement in C# code?

b) What is the default root namespace for a class library

c) What is the purpose of Constructor

d) A floating point data type is represented by __________ and


_______types in C#.net programming language.
Q6. What is a class library ?
a) The Class library can contain set of global methods.
b) The Class library contains only the set of class definitions.
c) The Class library is in binary format
d) The class library can be shared across applications written in different
languages supported.

Q8.In a method where if parameter is passed as Ref what is the result ?


a) The argument value is copied into method parameter
b) Method parameter contains the address of argument value.
c) The method can make global changes in the value of arguments.
d) The change in parameter value will only be local in method.

Q9.How the destructor is defined in C#.net ?


a) The destructor is defined as a special method to de-allocate memory
space.
b) The destructor has to be explicitly called to destroy the object memory.
c) ~ClassName method works as destructor.
d) The caller has to define the destruction code in destructor

Q11.What is Garbage Collector in .net ?


a) The Garbage Collector runs in background and always destroys the
unclaimed object memories.
b) The Garbage Collector calls ‘Finalize’ before destroying the object
memory.
c) The Garbage Collector cannot be called explicitly.
d) The Garbage Collector can use the object memory to assign to others.

Q12. What is true about Constructors in Class ?


a) The compiler always provides a default constructor for every class.
b) The compiler always calls the base class default constructor in every
derived class constructor.
c) The Constructor is used to initialize the object property values.
d) The Constructor can call other Constructors of same class directly as any
other methods.

Q13. What is true in following ?


a) Base can be used only for calling base class Constructors
b) this can be used to call other Constructors of same class.
c) MyClass can be used only with static methods.
d) This represents current object while Base represents base class object.

Q14.What is true about static variables ?


a) The static variable has a single copy for all the objects.
b) The static variable is controlled only by First object of class.
c) The static variable can accessed by using Class Name without creating
any objects.
d) The static variable cannot be accessed inside instance methods

Q15 What are Late Binding and Early Binding ?


a) Late Binding: runtime binding and Early Binding: compile time binding
as compilation is done before executing an application so it is called early
binding

b) Late binding occurs in Class constructors


c) Early bindings are defined in overloaded methods with different set of
parameters.
d) Late bindings are defined in method overriding in derived classes.

Q16. State True Or False


a) The variables declared inside the Try block can be accessed inside the
corresponding Catch handler
b) Two try blocks can share a single catch block
c) A method can be defined as taking variable number of arguments at runtime.
d) The Finally block terminates the try block code

Q17. Explain in brief the Difference between Overriding and overloading?


Ans :

Q19. What is the Difference between Internal and Protected Friend?


What is the Difference between an abstract class and interface?
Ans :

Q20. What methods of Base class cannot be overridden in derived classes?


a) virtual methods
b) Base class constructors
c) sealed
d) static Methods

Q21 What is the Difference between CLR & CTS?


What are the Differences between class and structure?
Ans :

Q25.Fill in the blanks


a) The ____________keyword is used to allow method overriding

b) The ______________keyword is used to define an abstract class

c) The _______________ keyword is used to terminate the try block code.

***************

Você também pode gostar