0% found this document useful (0 votes)
33 views3 pages

MCQ

Uploaded by

p
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views3 pages

MCQ

Uploaded by

p
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

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

a) Exception b) StackUnderflowException c) FileFoundException


d) Divide By zero Exception
2. Which of these keywords is not a part of exception handling?
a) try b) finally c) thrown d) catch
3. Which of these keywords must be used to monitor exceptions?
a) try b) finally c) throw d) catch
4. Which of these keywords is used to manually throw an exception?
a) try b) finally c) throw d) catch
5. Which of these clauses will be executed even if no exceptions are found?
a) throws b) finally c) throw d) catch
Finally keyword is used to define a set of instructions that will be executed irrespective of
whether the exception is found or not.
6. A single try block must be followed by which of these?
a) finally b) catch c) Both a & b d) None of the mentioned
7. Which of these exceptions handles the divide by zero error?
a) ArithmeticException b) MathException c) IllegalAccessException
d) IllegarException
8. Which of these exceptions will occur if we try to access the index of an array beyond its
length? a) ArithmeticException b) ArrayException c) ArrayArguementException
d) IndexOutOfRangeException
9. What is the use of try & catch? a) It is used to manually handle the exception b) It helps to
fix the errors c) It prevents automatic terminating of the program in cases when an exception
occurs d) All of the mentioned
10. Choose the statement which is incorrect?
a) try block does not need to be followed by catch block
b) try block can be followed by finally block instead of catch block
c) try can be followed by both catch and finally block
d) try need not to be followed by anything
11. Which of the keywords are used for the block to be examined for exceptions?
a) try b) catch c) throw d) check
12. Which of these keywords are used for the block to handle the exceptions generated by try
block?
a) try b) catch c) throw d) check
12. Which of these keywords are used for generating an exception manually?
a) try b) catch c) throw d) check
13. Which of the following statement is correct about Exception?
a) It occurs during compile-time b) It occurs during run-time
c) It occurs during loading of the program d) It occurs during JIT compilation.
14. In C#.NET if we do not catch the exception thrown at runtime then which of the following will
catch it?
a) Compiler b) CLR c) Linker d) Operating Sytem
1. The global assembly cache:
a. Can store two dll files with the same name
b. Can store two dll files with the same name, but different version
c. Can store two dll files with the same name and same version
d. Can not store dll files with the same name
2. What are the core components of the .Net framework data provider model?
a. DataAdapter and DataReader b. Connection and Command
c. DataAdapter, Connection, and Command
d. DataAdapter, DataReader, Connection, and Command
3. Dot Net Framework consists of :
a. Common language runtime b. Set of class libraries
c. Common language runtime and set of class libraries
4. Which of the following types of cursors is available with ADO.NET DataReader object?
a. server-side, forward-only, and read-write cursor
b. server-side, forward-only, and read-only cursor
c. server-side, backward-only, and read-write cursor
d. server-side, bidirectional, and read-only cursor
5. Can you overload a function with the same number and types of arguments (parameters) but
with a different return type?
a. Yes b. No c. Yes, but only if function is static d. Yes, but only if function is virtual
6. Which of the following are true about constructors and member functions?
a. A constructor can return values, but a member function cannot
b. A member function can declare and define values, but a constructor cannot
c. A member function can return values, but a constructor cannot
d. All of the above
7.Which of the following statements are correct with regard to Polymorphism?
a. Polymorphism is a process by which a class can exist in multiple forms
b. Polymorphism is a process by which a class can exist in only two forms
c. Polymorphism is a process by which objects of a reference type can display
different behavior d. Polymorphism is a process by which different instances of the same
class display different behavior e. Polymorphism allows old code in a class library to call new
code written by a programmer that derives a class from a class in the class library
8___________ namespace is not defined in the .NET class library.
a. System b. System.Colllection c. System.IO d. System.Threading
9.Which object oriented concept is related to the derivation of a class based on another class?
a. Encapsulation b. Polymorphism c. Data Hiding d. Inheritance
9.Which of the following help increase the code safety and stability?
a. Inheritance b. Polymorphism c. Abstraction d. Encapsulation
10. Which of the following is capable of returning multiple rows and multiple columns from the
database?
a. ExecuteReader b. ExecuteXmlReader c. DataAdapter d. All of the above
11. Which of the following define the rules for .Net Languages?
a. GAC b. CLS c. CTS d. CLR
12. Which of the following are true?
a. Function overloading is an example of static polymorphism
b. Operator overloading is an example of static polymorphism
c. Function overloading is an example of dynamic polymorphism
d. Operator overloading is an example of dynamic polymorphism
e. Overriding virtual functions of the parent class in a derived class is an example of static
polymorphism f. Overriding virtual functions of the parent class in a derived class is an
example of dynamic polymorphism
1) Correct statement about constructors in C#.NET is ?
a) Constructors cannot be overloaded
b) Constructors allocate space for object in memory
c) Constructors are never called explicitly
d) Constructors have same name as name of the class
2) Which among the following is the correct statement :
Constructors are used to
a) initialize the objects b) construct the data members
c) both a & b d) None of the mentioned
3) Can the method add() be overloaded in the following ways in C#?
public int add() { }
public float add(){ }
a) True b) False c) None of the mentioned.
4) Which of the following statements is correct about constructors in C#.NET?
a) A constructor cannot be declared as private b) A constructor cannot be overloaded
c) A constructor can be a static constructor d) None of the mentioned
5. What is the return type of constructors?
a) int b) float c) void d) None of the mentioned
6) Which method has the same name as that of its class?
a) delete b) class c) constructor d) None of mentioned
7) Which operator among the following signifies the destructor operator?
a) :: b) : c) ~ d) &.
8) Operator used to free the memory when memory is allocated ?
a) new b) free c) delete d) None of the mentioned
9) Select correct statement about destructor in C#? a) A class can have one destructor only b)
Destructors cannot be inherited or overloaded c) Destructors can have modifiers or parameters
d) Both a and b
10) Which of the following is not a namespace in the .NET Framework Class Library?
a) System.Process b) System.Security c) System.Threading d) System.xml
11) Which is the correct statement about the namespaces in C#.NET?
a) Nesting of namespaces is permitted, provided all the inner namespaces are declared in the
same file b) A namespace cannot be tested c) There is no limit on the number of levels
while nesting namespaces d) All of the mentioned
12) Select the type of multitasking methods that exist:
a) process based b) thread based c) only a d) Both a & b
13) What is the advantage of the multithreading program?
a) Enables to utilize the idle and executing time present in most programs b) Enables to utilize
the idle time present in most programs c) Both a & b d) Only b
14) Select the two type of threads mentioned in the concept of multithreading:
a) foreground b) background c) only a d) Both a & b
15) How many threads that exist for each of the processes that occurs in the program:
a) At least 1 b) More than one c) Only 1 d) All of these
16) Each process must be consists of more than one thread.-False
17) Choose the namespace which supports multithreading programming:
a) System.net b) System.Linq c) System.Threading d) All of the mentioned
18) Which of these classes is used to make a thread?
a) String b) System c) Thread d) Runnable
19) On call of which type of method the new created thread will not start executing?
a) Begin() b) Start() c) New() d) All of the mentioned
20) Which of these method of Thread class is used to Suspend a thread for a period of time? a)
sleep() b) terminate() c) suspend() d) stop()
21) Which among the following is the ordered collection class?
a) SortedList b) Queue c) Stack d) All of these
22) The correct statements about a HashTable collection are?
a) It is a keyed collection b) It is a ordered collection c) It is an indexed collection d) It
implements a IDictionaryEnumerator interface in its inner class
23) Which feature enables to obtain information about the use and capabilities of types at
runtime?
a) Runtime type ID b) Reflection c) Attributes d) None of the mentioned
24) Choose the namespace which consists of classes that are part of .NET Reflection API:
a) System.Text b) System.Name c) System.Reflection d) None of the mentioned
25) Which of the following are the correct statements about delegates?
a) Delegates can be used to implement callback notification b) Delegates permit execution of a
method on a secondary thread in an asynchronous manner d) Delegate is a user defined type
e) All of these
26) Incorrect statements about delegates are?
a) Delegates are reference types b) Delegates are object oriented
c) Delegates are type safe d) Only one method can be called using a delegate
27) Which of given statements are valid about generics in .NET Framework?
a) generics are useful in collection classes in .NET framework b) generics delegates are
not allowed in C#.NET c) generics is a language feature d) All of the mentioned
28) To implement delegates, the necessary condition is?
a) class declaration b) inheritance c) run time polymorphism d) exceptions
29) Choose the correct statement among the following about the delegate?
a) delegates are of reference types b) delegates are object oriented
c) delegates are type safe d) All of these
30) Which of the following is an incorrect statement about delegate?
a) A single delegate can invoke more than one method b) delegates could be shared
c) delegates are type safe wrappers for function pointers
d) delegate is a value type
31) Choose the incorrect statement about delegates?
a) delegates are not type safe b) delegates cannot be used to implement callback notification
c) Both a and b d) None of these
32) Which of these classes is used to create an object whose character sequence is mutable?
a) String() b) StringBuilder() c) Both of the mentioned d) None of the mentioned
33) Select the method used to write single byte to a file?
a) Write() b) Wrteline() c) WriteByte() d) All of the mentioned
34) What is meant by the term generics?
a) parameterized types b) class c) structure d) interface
35) Choose the advantages of using generics? a) Generics facilitate type safety
b) Generics facilitate improved performance and reduced code c) Generics promote the usage of
parameterized types d) All of the mentioned
36) Which among the given classes is present in System.Collection.Generic.namespace?
a) Stack b) Tree c) Sorted Array d) All of the mentioned
37) Where the properties can be declared?
a) Class b) Struct c) Interface d) All of these
38) Select the modifiers which can be used with the properties?
a) Private b) Public c) Protected Internal d) Protected e) All of these
39) Which keyword is used to declare a base class method while performing overidding of base
class methods?
a) this b) virtual c) override d) extend
40) The process of defining a method in subclass having same name & type signature as a
method in its superclass is known as?
a) Method overloading b) Method overriding c) Method hiding d) None of the mentioned
41) Which of the given modifiers can be used to prevent Method overriding?
a) Static b) Constant c) Sealed d) final
42) Which of the following can be used to declare a class as a virtual?
a) Methods b) Properties c) Events d) All of these
43) The modifier used to hide the base class methods is ?
a) Virtual b) New c) Override d) Sealed
44) The process of defining two or more methods within the same class that have same name
but different parameters list?
a) method overloading b) method overriding c) Encapsulation d) None of the mentioned
45) Which of these can be overloaded?
a) Constructors b) Methods c) Both a & b d) None of the mentioned
46) Which among the following cannot be used as a datatype for an enum in C#.NET?
a) short b) double c) int d) float
47) Correct statement about enum used in C#.NET is?
a) An enum can be declared inside a class b) An object can be assigned to an enum variable
c) An enum can be declared outside a class
d) An enum can have Single and Double values

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy