NewsTicker

C# Language Quiz


Online Examination for C# Language Quiz Question And Answer






Online Test


1. Which of the following statements is correct about Managed Code?

Managed code is the code that is compiled by the JIT compilers
Managed code is the code where resources are Garbage Collected.
Managed code is the code that runs on top of Windows.
Managed code is the code that is written to target the services of the CLR
-----------------------------------------------------------------------------------------------------------------
2. Which of the following utilities can be used to compile managed assemblies into processor-specific native code?

gacutil
ngen
sn
dumpbin
-----------------------------------------------------------------------------------------------------------------
3. Which of the following is NOT a Bitwise operator in C#.NET?

&
|
<<

^
-----------------------------------------------------------------------------------------------------------------
4. Which of the following is NOT an Arithmetic operator in C#.NET?

**
+
/
%
-----------------------------------------------------------------------------------------------------------------
5. Which of the following statements is correct?

A constructor can be used to set default values and limit instantiation.
C# provides a copy constructor.
Destructors are used with classes as well as structures
A class can have more than one destructor
-----------------------------------------------------------------------------------------------------------------
6. Which of the following statements is correct about constructors?

If we provide a one-argument constructor then the compiler still provides a zero-argument constructor.
Static constructors can use optional arguments
Overloaded constructors cannot use optional arguments
If we do not provide a constructor, then the compiler provides a zero-argument constructor.
-----------------------------------------------------------------------------------------------------------------
7. A Student class has a property called rollNo and stu is a reference to a Student object and we want the statement stu.RollNo = 28 to fail. Which of the following options will ensure this functionality?

Declare rollNo property with both get and set accessors
Declare rollNo property with only set accessor
Declare rollNo property with get, set and normal accessors.
Declare rollNo property with only get accessor
-----------------------------------------------------------------------------------------------------------------
8. Which of the following keyword is used to overload user-defined types by defining static member functions?

op
opoverload
operator
operator
-----------------------------------------------------------------------------------------------------------------
9. Which of the following keyword is used to change the data and behavior of a base class by replacing a member of a base class with a new derived member?

new
base
overloads
override
-----------------------------------------------------------------------------------------------------------------
10. A derived class can stop virtual inheritance by declaring an override as

inherits
extends
inheritable
sealed
-----------------------------------------------------------------------------------------------------------------
11. Which of the following statements is incorrect about delegate?

Delegates are reference types.
Delegates are object oriented.
 Delegates are type-safe.
Only one method can be called using a delegate
-----------------------------------------------------------------------------------------------------------------
12. In which of the following areas are delegates commonly used?1.Remoting 2. Serialization 3.File Input/Output 4.Multithreading 5.Event handling

1 and 2 only
1 and 5 only
1, 2 and 3 only
4 and 5 only
-----------------------------------------------------------------------------------------------------------------
13. Which of the following is the necessary condition for implementing delegates?

Class declaration
Inheritance
Run-time Polymorphism
Exceptions
-----------------------------------------------------------------------------------------------------------------
14. Which of the following is an 8-byte Integer?

Char
Long
Short
Byte
-----------------------------------------------------------------------------------------------------------------
15. Which of the following is NOT an Integer?

Char
Byte
Integer
Short
-----------------------------------------------------------------------------------------------------------------
16. The [Serializable()] attribute gets inspected at

Compile-time
Run-time
Design-time
Linking-time
-----------------------------------------------------------------------------------------------------------------
17. Which of the following are correct ways to specify the targets for a custom attribute?

By applying AttributeUsage to the custom attribute's class definition
By applying UsageAttribute to the custom attribute's class definition
Once an attribute is declared it applies to all the targets By applying AttributeUsageAttribute to the custom attribute's class definition.
-----------------------------------------------------------------------------------------------------------------
18. A class implements two interfaces each containing three methods. The class contains no instance data. Which of the following correctly indicate the size of the object created from this class?

12 bytes
24 bytes
0 byte
16 bytes
-----------------------------------------------------------------------------------------------------------------
19. Which of the following statements is correct about Interfaces used in C#.NET?

All interfaces are derived from an Object class.
Interfaces can be inherited
All interfaces are derived from an Object interface
Interfaces can contain only method declaration
-----------------------------------------------------------------------------------------------------------------
20. Which of the following is not a logical data-base structure?

tree
relational
network

chain
-----------------------------------------------------------------------------------------------------------------
21. Which of the following is(are) true of the EDP auditors?

they should have computer expertise
they will be replaced by traditional auditors in the near future
two of the above
currently, there is a very high demand for them, particularly from firms that use personal computers
-----------------------------------------------------------------------------------------------------------------
22. Controls of data communication deal with

the communication channel
the computer
terminals  
All of the above
-----------------------------------------------------------------------------------------------------------------
23. System Study involves

study of an existing system
documenting the existing system
identifying current deficiencies and establishing new goals
All of the above
-----------------------------------------------------------------------------------------------------------------
24. The primary tool used in structured design is a

structure chart
data-flow diagram
program flowchart
module
-----------------------------------------------------------------------------------------------------------------
25. A program language:

defines the form of the instruction
is always machine dependent
is never machine dependent
All of the above
-----------------------------------------------------------------------------------------------------------------
Score =
Correct answers: