0% found this document useful (0 votes)
45 views6 pages

Csharp Mock Test II

-

Uploaded by

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

Csharp Mock Test II

-

Uploaded by

asha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

C# MOCK TEST

[Link] Copyright © [Link]

This section presents you various set of Mock Tests related to C#. You can download these sample
mock tests at your local machine and solve offline at your convenience. Every mock test is
supplied with a mock test key to let you verify the final score and grade yourself.

C# MOCK TEST II

Q 1 - Which of the following converts a type to a 64-bit integer in C#?

A - ToInt64

B - ToSbyte

C - ToSingle

D - ToInt32

Q 2 - Which of the following converts a type to a signed byte type in C#?

A - ToInt64

B - ToSbyte

C - ToSingle

D - ToInt32

Q 3 - Which of the following converts a type to a small floating point number in C#?

A - ToInt64

B - ToSbyte

C - ToSingle

D - ToInt32

Q 4 - Which of the following converts a type to a string in C#?

A - ToInt64

B - ToSbyte
C - ToSingle

D - ToString

Q 5 - Which of the following converts a type to a specified type in C#?

A - ToType

B - ToSbyte

C - ToSingle

D - ToString

Q 6 - Which of the following converts a type to an unsigned int type in C#?

A - ToType

B - ToUInt16

C - ToSingle

D - ToString

Q 7 - Which of the following converts a type to an unsigned long type in C#?

A - ToType

B - ToUInt16

C - ToUInt32

D - ToString

Q 8 - Which of the following converts a type to an unsigned big type in C#?

A - ToType

B - ToUInt16

C - ToUInt32

D - ToUInt64

Q 9 - Which of the following operator returns the size of a data type in C#?

A - sizeof

B - typeof

C-&

D-*

Q 10 - Which of the following operator returns the type of a class in C#?


A - sizeof

B - typeof

C-&

D-*

Q 11 - Which of the following operator returns the address of an variable in C#?

A - sizeof

B - typeof

C-&

D-*

Q 12 - Which of the following operator creates a pointer to a variable in C#?

A - sizeof

B - typeof

C-&

D-*

Q 13 - Which of the following operator represents a conditional operation in C#?

A - ?:

B - is

C - as

D-*

Q 14 - Which of the following operator determines whether an object is of a certain


type in C#?

A - ?:

B - is

C - as

D-*

Q 15 - Which of the following operator casts without raising an exception if the cast
fails in C#?

A - ?:

B - is

C - as

D-*
Q 16 - Which of the following statements is correct about encapsulation?

A - Encapsulation is defined as the process of enclosing one or more items within a physical or
logical package.

B - Encapsulation, in object oriented programming methodology, prevents access to


implementation details.

C - Abstraction allows making relevant information visible and encapsulation enables a


programmer to implement the desired level of abstraction.

D - All of the above.

Q 17 - Which of the following statements is correct about access specifiers in C#?

A - Encapsulation is implemented by using access specifiers.

B - An access specifier defines the scope and visibility of a class member.

C - Both of the above.

D - None of the above.

Q 18 - Which of the following access specifier in C# allows a class to expose its


member variables and member functions to other functions and objects?

A - Public

B - Private

C - Protected

D - Internal

Q 19 - Which of the following access specifier in C# allows a class to hide its member
variables and member functions from other functions and objects?

A - Public

B - Private

C - Protected

D - Internal

Q 20 - Which of the following access specifier in C# allows a child class to access the
member variables and member functions of its base class?

A - Public

B - Private

C - Protected

D - Internal
Q 21 - Which of the following access specifier in C# allows a class to expose its
member variables and member functions to other functions and objects in the current
assembly?

A - Public

B - Private

C - Protected

D - Internal

Q 22 - Which of the following access specifier in C# allows a class to hide its member
variables and member functions from other class objects and functions, except a child
class within the same application?

A - Protected Internal

B - Private

C - Protected

D - Internal

Q 23 - Which of the following method copies the actual value of an argument into the
formal parameter of the function?

A - Value parameters

B - Reference parameters

C - Output parameters

D - None of the above.

Q 24 - Which of the following method copies the reference to the memory location of
an argument into the formal parameter?

A - Value parameters

B - Reference parameters

C - Output parameters

D - None of the above.

Q 25 - Which of the following method helps in returning more than one value?

A - Value parameters

B - Reference parameters

C - Output parameters

D - None of the above.

ANSWER SHEET
Question Number Answer Key

1 A

2 B

3 C

4 D

5 A

6 B

7 C

8 D

9 A

10 B

11 C

12 D

13 A

14 B

15 C

16 D

17 C

18 A

19 B

20 C

21 D

22 A

23 A

24 B

25 C

Loading [MathJax]/jax/output/HTML-CSS/[Link]

You might also like