0

Visual Basic (VB) .net Quiz - 1

Description: Visual Basic (VB) .net Quiz - 1
Number of Questions: 10
Created by:
Tags: .net vb
Attempted 0/10 Correct 0 Score 0

Which is not an optional element of a sub procedure declaration?

  1. Parameters

  2. Public

  3. Private

  4. Statements

  5. Sub


Correct Option: E

Which is a valid way to write a sub procedure declaration?

  1. Use the Class and Method combo boxes in the Code Editor window.

  2. Double click on the object in the Form Designer window.

  3. Type the procedure declaration in the Code Editor window.

  4. Both a and b.

  5. All of the above.


Correct Option: C
  1. Return Sales*0.08

  2. CalculateTax = Sales*0.08

  3. Return CalculateTax (Sales*0.08)

  4. Both a and b.

  5. All of the above.


Correct Option: D

Which part of a function procedure declaration statement is optional?

  1. Datatype

  2. Function

  3. Parameters

  4. Private

  5. ProcedureName


Correct Option: C

How many return statements are allowed in a Function Procedure?

  1. 1

  2. 2

  3. 3

  4. There is no limit.


Correct Option: D

Why should a variable not be declared as a module variable?

  1. It prevents a procedure from being self contained.

  2. It makes it easier to document the code.

  3. Local variable names can be reused in other procedures.

  4. Both a and b.

  5. All of the above.


Correct Option: E

Which variable name uses a standard naming convention for module variables?

  1. mWeight

  2. mdWeight

  3. moduleWeight

  4. module_Weight


Correct Option: A
  1. the length of the variable.

  2. the name of the variable.

  3. the accessibility of the variable.

  4. the datatype of the variable.

  5. the lifetime of the variable.


Correct Option: C

What is the value of the index for the first element in a VB.NET array?

  1. 1

  2. 2

  3. 3

  4. Depends on what the assigned value is.


Correct Option: D

Which method will return the number of elements in an array?

  1. Dimension

  2. Length

  3. Number

  4. Size

  5. UpperBound


Correct Option: B
- Hide questions