VB.Net Mock Test


Advertisements


This section presents you various set of Mock Tests related to VB.Net. 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.

Questions and Answers

VB.Net Mock Test I

Q 3 - Which of the following is an entry point method of VB.NET program?

A - Sub Main

B - function main

C - Both of the above.

D - None of the above.

Answer : A

Explanation

Sub Main indicates the entry point of VB.Net program.

Q 4 - Which of the following is a basic data type in VB.NET?

A - Boolean

B - Byte

C - Char

D - All of the above.

Answer : D

Explanation

All of the above are basic data types.

Answer : D

Explanation

All of the above options are correct.

Q 6 - Which of the following converts the expression to Boolean data type in VB.NET?

A - CBool(expression)

B - CByte(expression)

C - CChar(expression)

D - CDate(expression)

Answer : A

Explanation

CBool(expression) − Converts the expression to Boolean data type.

Q 7 - Which of the following converts the expression to Byte data type in VB.NET?

A - CBool(expression)

B - CByte(expression)

C - CChar(expression)

D - CDate(expression)

Answer : B

Explanation

CByte(expression) − Converts the expression to Byte data type.

Q 8 - Which of the following converts the expression to Char data type in VB.NET?

A - CBool(expression)

B - CByte(expression)

C - CChar(expression)

D - CDate(expression)

Answer : C

Explanation

CChar(expression) − Converts the expression to Char data type.

Q 9 - Which of the following converts the expression to Date data type in VB.NET?

A - CBool(expression)

B - CByte(expression)

C - CChar(expression)

D - CDate(expression)

Answer : D

Explanation

CDate(expression) − Converts the expression to Date data type.

Q 10 - Which of the following converts the expression to Double data type in VB.NET?

A - CDbl(expression)

B - CDec(expression)

C - CInt(expression)

D - CLng(expression)

Answer : A

Explanation

CDbl(expression) − Converts the expression to Double data type.

Q 11 - Which of the following converts the expression to Decimal data type in VB.NET?

A - CDbl(expression)

B - CDec(expression)

C - CInt(expression)

D - CLng(expression)

Answer : B

Explanation

CDec(expression) − Converts the expression to Decimal data type.

Q 12 - Which of the following converts the expression to Integer data type in VB.NET?

A - CDbl(expression)

B - CDec(expression)

C - CInt(expression)

D - CLng(expression)

Answer : C

Explanation

CInt(expression) − Converts the expression to Integer data type.

Q 13 - Which of the following converts the expression to Long data type in VB.NET?

A - CDbl(expression)

B - CDec(expression)

C - CInt(expression)

D - CLng(expression)

Answer : D

Explanation

CLng(expression) − Converts the expression to Long data type.

Q 14 - Which of the following converts the expression to Object data type in VB.NET?

A - CObj(expression)

B - CSByte(expression)

C - CShort(expression)

D - CSng(expression)

Answer : A

Explanation

CObj(expression) − Converts the expression to Object data type.

Q 15 - Which of the following converts the expression to SByte data type in VB.NET?

A - CObj(expression)

B - CSByte(expression)

C - CShort(expression)

D - CSng(expression)

Answer : B

Explanation

CSByte(expression) − Converts the expression to SByte data type.

Q 16 - Which of the following converts the expression to Short data type in VB.NET?

A - CObj(expression)

B - CSByte(expression)

C - CShort(expression)

D - CSng(expression)

Answer : C

Explanation

CShort(expression) − Converts the expression to Short data type.

Q 17 - Which of the following converts the expression to Single data type in VB.NET?

A - CObj(expression)

B - CSByte(expression)

C - CShort(expression)

D - CSng(expression)

Answer : D

Explanation

CSng(expression) − Converts the expression to Single data type.

Q 18 - Which of the following converts the expression to String data type in VB.NET?

A - CStr(expression)

B - CSByte(expression)

C - CShort(expression)

D - CSng(expression)

Answer : A

Explanation

CStr(expression) − Converts the expression to String data type.

Q 19 - Which of the following accesss modifier specifies that Visual Basic should marshal all strings to American National Standards Institute (ANSI) values regardless of the name of the external procedure being declared in VB.NET?

A - Ansi

B - Assembly

C - Async

D - Auto

Answer : A

Explanation

Ansi − Specifies that Visual Basic should marshal all strings to American National Standards Institute (ANSI) values regardless of the name of the external procedure being declared.

Q 20 - Which of the following accesss modifier specifies that an attribute at the beginning of a source file applies to the entire assembly?

A - Ansi

B - Assembly

C - Async

D - Auto

Answer : B

Explanation

Assembly − Specifies that an attribute at the beginning of a source file applies to the entire assembly.

Q 21 - Which of the following accesss modifier indicates that the method or lambda expression that it modifies is asynchronous?

A - Ansi

B - Assembly

C - Async

D - Auto

Answer : C

Explanation

Async − Indicates that the method or lambda expression that it modifies is asynchronous. Such methods are referred to as async methods. The caller of an async method can resume its work without waiting for the async method to finish.

Q 22 - Which of the following accesss modifier specifies that Visual Basic should marshal strings according to .NET Framework rules?

A - Ansi

B - Assembly

C - Async

D - Auto

Answer : D

Explanation

Auto − The charset modifier part in the Declare statement supplies the character set information for marshaling strings during a call to the external procedure. It also affects how Visual Basic searches the external file for the external procedure name. The Auto modifier specifies that Visual Basic should marshal strings according to .NET Framework rules.

Q 23 - Which of the following accesss modifier specifies that an argument is passed by reference?

A - ByRef

B - ByVal

C - Default

D - Friend

Answer : A

Explanation

ByRef − Specifies that an argument is passed by reference, i.e., the called procedure can change the value of a variable underlying the argument in the calling code.

Q 25 - Which of the following accesss modifier specifies that an argument is passed in such a way that the called procedure or property cannot change the value of a variable underlying the argument in the calling code?

A - ByRef

B - ByVal

C - Default

D - Friend

Answer : B

Explanation

ByVal − Specifies that an argument is passed in such a way that the called procedure or property cannot change the value of a variable underlying the argument in the calling code.

Answer Sheet

Question Number Answer Key
1 C
2 D
3 A
4 D
5 D
6 A
7 B
8 C
9 D
10 A
11 B
12 C
13 D
14 A
15 B
16 C
17 D
18 A
19 A
20 B
21 C
22 D
23 A
24 C
25 B

vb.net_questions_answers.htm

Advertisements
E-Books Store