111
84.1k

C#.NET Programming Solved MCQs

These multiple-choice questions (MCQs) are designed to enhance your knowledge and understanding in the following areas: Computer Science Engineering (CSE) , Information Technology Engineering (IT) , Programming Languages .

1.

The compiled version of a VC#.NET program will be in_______________.

A. Machine code
B. IL code
C. Byte code
D. None of these
Answer» A. Machine code
2.

The purpose of JIT compiler is to convert____________.

A. VC#.NET source code IL code
B. IL code to byte code
C. IL code to managed native code
D. None of these
Answer» B. IL code to byte code
3.

The Garbage Collection solves_____________.

A. Memory leakage problem
B. DLL hell problem
C. Both a & b
D. None of these
Answer» A. Memory leakage problem
4.

The code that requires the CLR at runtime for the execution is known as the ________.

A. IL code
B. Managed code
C. Binary code
D. One of these
Answer» B. Managed code
5.

Which one of the following JIT compilers produce highly optimized code?

A. Econo JIT
B. Standard JIT
C. Pre JIT
D. None of these
Answer» B. Standard JIT
6.

The VC#.NET language________________.

A. Solves the memory leakage problems.
B. Solves the DLL hell problems.
C. Has very good correspondence with the IL language.
D. All the above.
Answer» B. Solves the DLL hell problems.
7.

Home page in VS.NET is also known as__________.

A. Default page
B. Start page
C. First page
D. Welcome page
Answer» B. Start page
8.

The ______________ enables to move through the code very quickly.

A. Class view window
B. Solution explorer window
C. Code window
D. none of these
Answer» C. Code window
9.

In VC#.NET project files are grouped into a _____________.

A. Workspace
B. Namespace
C. Solution
D. Package
Answer» C. Solution
10.

Which one of the following statements about code debugging is correct?

A. Debugger helps us to step through our code, one line at a time.
B. Breakpoints can be set by pressing F9 function key.
C. Breakpoints can be set by left-clicking in the left margin area at the line where we want to set the breakpoint.
D. a, b and c are correct.
Answer» A. Debugger helps us to step through our code, one line at a time.
11.

The arrays involved in a jagged array_____________.

A. Should be of same size.
B. May be of different sizes.
C. Are not known as subarrays.
D. None of these.
Answer» B. May be of different sizes.
12.

The parameters of a method __________.

A. Help us to pass information to a method.
B. Help us to get information from a method.
C. Help us to pass information to and from a method.
D. None of these.
Answer» C. Help us to pass information to and from a method.
13.

The ref type parameters are____________.

A. “Input only” parameters.
B. “Input / Output” parameters.
C. “Output only” parameters.
D. None of these.
Answer» B. “Input / Output” parameters.
14.

The out type parameters can be used_______________.

A. Only to pass back a result to the calling functions.
B. Only to send information to the called function.
C. To pass data to the called method and receive information from the called method.
D. None of these.
Answer» A. Only to pass back a result to the calling functions.
15.

In case of the Params type parameter____________.

A. Only output can be sent.
B. The number of arguments is variable.
C. Both input and output can be handled.
D. None of these.
Answer» B. The number of arguments is variable.
16.

An instance class member is referred by using the format____________.

A. Object name. Class member name.
B. Class name. Class member name.
C. Object name. Class member name or class name. class member name.
D. None of these.
Answer» A. Object name. Class member name.
17.

Overloaded constructors will have________.

A. Different names
B. Different parameter lists
C. Different return types
D. none of these.
Answer» B. Different parameter lists
18.

A static constructor_____________.

A. Is executed when the class is loaded.
B. Can be accessed through an object name.
C. Can be executed any number of times.
D. Can have its own destructor.
Answer» A. Is executed when the class is loaded.
19.

A property________________.

A. Should have a get method.
B. Should have a put method.
C. Should have both get and put methods.
D. Should have either a get method or put method.
Answer» A. Should have a get method.
20.

An indexer________________.

A. Enables us to access a property through index.
B. Can have user-defined name.
C. Is identified by its name.
D. Cannot be overloaded.
Answer» A. Enables us to access a property through index.
21.

A namespace can contain___________.

A. Classes
B. Namespaces
C. Classes and namespaces
D. None of these.
Answer» A. Classes
22.

The alias should have

A. Improve the readability of the code.
B. Avoid name clashes.
C. Saves you typing out very long strings.
D. All the above.
Answer» D. All the above.
23.

In the case of a component,

A. Reusability is possible.
B. Code will be in IL format.
C. The extension is dll.
D. All the above.
Answer» D. All the above.
24.

In case of components and namespaces,

A. Several classes may be present in a component.
B. Classes contained in different source files may be part of same namespace.
C. Classes contained in a source file may be from different namespaces.
D. All the above.
Answer» C. Classes contained in a source file may be from different namespaces.
25.

In the case of access modifiers___________.

A. Private and protected access modifiers can be specified for a class.
B. Public access modifier can be specified for a class.
C. The scope of the internal access modifier is the namespace.
D. None of these.
Answer» D. None of these.
26.

The size of integer is___________.

A. 8 bits
B. 16 bits
C. 32 bits
D. 64 bits
Answer» A. 8 bits
27.

An instance of a value type variable is allocated memory on_______.

A. Stack
B. Heap
C. Both a&b
D. None of these
Answer» A. Stack
28.

An instance of a reference type variable is allocated memory on_______.

A. Stack
B. Heap
C. Both a&b
D. None of these
Answer» B. Heap
29.

The size of long is___________.

A. 8 bits
B. 16 bits
C. 32 bits
D. 64 bits
Answer» D. 64 bits
30.

________________ access modifier is applied to a method or a data member, it can be accessed by all classes in the same namespace and derived class in other namespace.

A. Public
B. Protected
C. Internal
D. Protected internal
Answer» D. Protected internal
31.

The first type of streams is specially used to represent _________

A. Binary data
B. text
C. data
D. derived
Answer» B. text
32.

The second type of streams is used to represent __________

A. Data
B. text
C. binary data
D. derived
Answer» C. binary data
33.

All IO classes that represent streams are derived from the ______ class.

A. Data
B. Stream
C. another
D. none
Answer» B. Stream
34.

The stream class has been designed to provide functional features for ________ and __________.

A. Creating, manipulating
B. displaying, manipulating
C. Creating, displaying
D. printing, creating
Answer» A. Creating, manipulating
35.

The file steam class is designed specifically for reading and writing_______________ files.

A. Class files
B. binary data
C. program
D. none
Answer» B. binary data
36.

A buffer is a block of bytes in memory used to ___________

A. Class data
B. binary data
C. cache data
D. data
Answer» C. cache data
37.

The Buffered Stream class is a ________ of the Stream class.

A. Base class
B. binary class
C. Derived class
D. class
Answer» C. Derived class
38.

The text files are helpful in __________ and ____________ textual data.

A. Storing, displaying
B. storing, retrieving
C. Retrieving, displaying
D. displaying, retrieving
Answer» B. storing, retrieving
39.

A machine on a network is called ________

A. Node
B. data
C. address
D. store
Answer» A. Node
40.

The node is also called as ______________

A. Data
B. class
C. host
D. cache
Answer» C. host
41.

The various possible values of dock property are_________

A. TOP, Left
B. Fill, right
C. Side, upright
D. Both (a) and (B)
Answer» D. Both (a) and (B)
42.

The ADO.NET provides greater case of ___________

A. Programming
B. higher dependency
C. Improve data source
D. both (a) and (b)
Answer» D. both (a) and (b)
43.

Only ___________ amount of processing time is needed for data conversion.

A. Large
B. small
C. none
D. allocated time
Answer» B. small
44.

A Managed provider can be considered as a set of objects that mediate between a _____________ and _______________

A. Data source
B. VB.NET program
C. data
D. both (a) and (b)
Answer» D. both (a) and (b)
45.

The main ASP.NET page class is derived from the ____________ class

A. Page
B. base
C. derived
D. main
Answer» A. Page
46.

We can attach _________ validation control to an input control

A. One
B. less than one
C. more than one
D. almost one
Answer» C. more than one
47.

The validation control has ____________ control.

A. Up level
B. down level
C. both
D. bottom level
Answer» C. both
48.

The up level browser will perform validation on the client, using the _________ and _____________

A. HTML, ASP
B. DHTML, java script
C. Both (a) and (b)
D. none
Answer» B. DHTML, java script
49.

For client-side custom validation, the name of the custom function must be identified in the ______________ function property

A. Client Validation
B. on client validation
C. On server validation
D. server validation
Answer» A. Client Validation
50.

For server-side custom validation, the name of the custom function must be identified in the ______________ function property

A. Client Validation
B. on client validation
C. On server validation
D. server validation
Answer» C. On server validation

Done Studing? Take A Test.

Great job completing your study session! Now it's time to put your knowledge to the test. Challenge yourself, see how much you've learned, and identify areas for improvement. Don’t worry, this is all part of the journey to mastery. Ready for the next step? Take a quiz to solidify what you've just studied.