MCQs | C/C Sample Test,Sample questions

Question:
A static constructor_____________

1. Is executed when the class is loaded.

2.Can be accessed through an object name.

3.Can be executed any number of times.

4.Can have its own destructor.


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

1.Stack

2.Heap

3.Both a&b

4.None of these


Question:
In the case of access modifiers___________.

1.Private and protected access modifiers can be specified for a class.

2.Public access modifier can be specified for a class.

3.The scope of the internal access modifier is the namespace.

4.None of these


Question:
The Garbage Collection solves_____________.

1.Memory leakage problem

2.DLL hell problem

3.both (a) and (b)

4.None of These


Question:
The up level browser will perform validation on the client, using the _________ and____________

1.HTML, ASP

2.DHTML, java script

3.Both (a) and (b)

4.none


Question:
The validation control has ____________ control.

1. Up level

2.down level

3.both

4.bottom level


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

1. Debugger helps us to step through our code, one line at a time.

2.Breakpoints can be set by pressing F9 function key.

3. Breakpoints can be set by left-clicking in the left margin area at the line where we want to set the breakpoint.

4.a, b and c are correct.


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

1.Public

2.Protected

3.Internal

4.Protected internal


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

1.Class data

2.binary data

3.cache data

4.data


Question:
A machine on a network is called ________

1.Node

2.data

3.address

4.store


Question:
A Managed provider can be considered as a set of objects that mediate between a_____________ and ___________

1.Data source

2.VB.NET program

3.data

4.both (a) and (b)


Question:
A namespace can contain___________.

1.Classes

2.Namespaces

3.Classes and namespaces

4.None of these


Question:
A property_____________

1.Should have a get method.

2.Should have a put method.

3.Should have both get and put methods.

4.Should have either a get method or put method.


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

1.Data

2.Stream

3.another

4.none


Question:
An indexer________________.

1.Enables us to access a property through index.

2.Can have user-defined name.

3.Is identified by its name.

4.Cannot be overloaded.


Question:
An instance class member is referred by using the format____________.

1.Object name. Class member name.

2.Class name. Class member name.

3.Object name. Class member name or class name. class member name.

4.None of these


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

1.Stack

2.Heap

3.Both a&b

4.None of these


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

1.Client Validation

2.on client validation

3.On server validation

4. server validation


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

1.Client Validation

2. on client validation

3.On server validation

4.server validation


Question:
Home page in VS.NET is also known as__________.

1.Default page

2.Start page

3.First page

4.Welcome page


Question:
In case of the Params type parameter____________.

1.Only output can be sent.

2.The number of arguments is variable.

3.Both input and output can be handled.

4.None of these


Question:
In the case of a component,

1.Reusability is possible.

2.Code will be in IL format.

3.The extension is dll.

4.All of the above


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

1.Workspace

2.Namespace

3.Solution

4.Package


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

1.Large

2.small

3.none

4.allocated time


Question:
Overloaded constructors will have________.

1.Different names

2.Different parameter lists

3.Different return types

4.none of these.


Question:
The ______________ enables to move through the code very quickly.

1.Class view window

2.Solution explorer window

3.Code window

4.None of These


Question:
The ADO.NET provides greater case of ___________

1.Programming

2.higher dependency

3.Improve data source

4.Both (a) and (b)


Question:
The alias should have

1.Improve the readability of the code.

2.Avoid name clashes.

3.Saves you typing out very long strings.

4.All the above.


Question:
The arrays involved in a jagged array__________

1. Should be of same size.

2.May be of different sizes

3.Are not known as subarrays.

4.None of these


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

1.Base class

2.binary class

3.Derived class

4.class


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

1. IL code

2.Managed code

3.Binary code

4.One of these


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

1. Machine code

2.IL code

3.Byte code

4.None of these


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

1.Class files

2.binary data

3.program

4.none


Question:
The first type of streams is specially used to represent _________

1.Binary data

2.text

3.data

4.derived


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

1.Page

2.base

3.derived

4.main


Question:
The node is also called as ______________

1.Data

2.class

3.host

4.cache


Question:
The out type parameters can be used_______________.

1.Only to pass back a result to the calling functions.

2.Only to send information to the called function.

3.To pass data to the called method and receive information from the called method.

4.None of these


Question:
The parameters of a method __________.

1.Help us to pass information to a method.

2.Help us to get information from a method.

3.Help us to pass information to and from a method.

4.None of these


Question:
The purpose of JIT compiler is to convert____________.

1. VC#.NET source code IL code

2. IL code to byte code

3.IL code to managed native code

4.None of These


Question:
The ref type parameters are____________.

1.Input only” parameters.

2.Input / Output” parameters.

3.Output only” parameters.

4.None of these


Question:
The second type of streams is used to represent __________

1. Data

2.text

3.binary data

4.derived


Question:
The size of integer is___________.

1.8 bits

2.16 bits

3.32 bits

4.64 bits


Question:
The stream class has been designed to provide functional features for ________ and__________.

1.Creating, manipulating

2.displaying, manipulating

3.Creating, displaying

4.printing, creating


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

1.Storing, displaying

2.storing, retrieving

3.Retrieving, displaying

4. displaying, retrieving


Question:
The various possible values of dock property are_________

1.TOP, Left

2.Fill, right

3.Side, upright

4.Both (a) and (B)


Question:
The VC#.NET language________________.

1.Solves the memory leakage problems.

2. Solves the DLL hell problems.

3.Has very good correspondence with the IL language.

4.All of the above


Question:
We can attach _________ validation control to an input control

1.One

2.less than one

3.more than one

4.almost one


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

1.Econo JIT

2.Standard JIT

3.Pre JIT

4.None of these


More MCQS

  1. C# MCQS -Programming (.NET Framework)
  2. C# MCQS -Programming(Control Instructions)
  3. C# MCQS - Functions and Subroutines(.NET Framework)
  4. C# Programming-Constructors
  5. C# Programming- Arrays
  6. C# Programming -Structures
  7. C# Programming-Properties
  8. C# Programming -Exception Handling
  9. C# Programming -Interfaces
  10. C# Programming -Delegates
  11. C# Programming -Generics
  12. C# Programming - Datatypes
  13. C# Programming- Operators
  14. C# Programming -Classes and Objects
  15. NET Programming mcqs
  16. Computer Science Engineering (CSE) .NET Programming
  17. C# Programming Mcq Set 1
  18. C# Programming Mcq Set 2
  19. C#.NET Programming Mcq
Search