Visual Basic (NCO)

The test contains basics of Visual Basic.

30 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Which of the following windows displays a list of all forms and modules for making an application in visual basic?

  1. Form layout window
  2. Properties window
  3. Form window
  4. Project window
  5. Main window
Question 2 Multiple Choice (Single Answer)

Which of the following functions is used to convert a number to a text string?

  1. Rnd
  2. Sqr
  3. Str
  4. Val
  5. Chr
Question 3 Multiple Choice (Single Answer)

How many bytes are used for currency data type in visual basic?

  1. 8 bytes
  2. 2 bytes
  3. 4 bytes
  4. No fix size
  5. 1 byte
Question 4 Multiple Choice (Single Answer)

In visual basic, + operator is used for the concatenation of the two strings. Other than +, which of the following symbols is used for this function?

  1. - operator
  2. & operator
  3. ^ operator
  4. Mod operator
  5. % operator
Question 5 Multiple Choice (Single Answer)

What is the meaning of the following statement in visual basic?

Number = Int(101 * Rnd) + 100

  1. It randomly chooses a number between 100 and 200.
  2. It randomly chooses a number between 101 and 200.
  3. It randomly chooses a number between 100 and 201.
  4. It randomly chooses a number between 101 and 201.
  5. It randomly chooses a number between 99 and 200.
Question 6 Multiple Choice (Single Answer)

The function form of the message box returns value. It it returns 5, then which of the following buttons is selected?

  1. OK button
  2. Abort button
  3. Cancel button
  4. Ignore button
  5. Retry button
Question 7 Multiple Choice (Single Answer)

Which branching statement(s) is/are used to cause certain actions within a program if a certain condition is met?

  1. If-else statements
  2. Looping statements
  3. For/Next statement
  4. GoTo Label statement
  5. Select Case statement
Question 8 Multiple Choice (Single Answer)

Which of the following controls has no events?

  1. Options
  2. Checkbok
  3. Command button
  4. Shape
  5. Listbox
Question 9 Multiple Choice (Single Answer)

Which common property of all dialog boxes restricts the file-names that appear in the file box?

  1. CancelError
  2. DialogTitle
  3. Flags
  4. Filter
  5. FileName
Question 10 Multiple Choice (Single Answer)

Which of the following options is any form event?

  1. Appearance
  2. Activate
  3. Cls
  4. Enabled
  5. Print
Question 11 Multiple Choice (Single Answer)

Which control is used to begin, interrupt or end a particular process in visual basic?

  1. Label
  2. Command button
  3. Text box
  4. Check boxes
  5. Option button
Question 12 Multiple Choice (Single Answer)

Which of the following codes is used in visual basic to print a distance between outputs like X Y Z?

  1. Print X; Y; Y
  2. Print X, Y, Z
  3. Print
  4. Print X,Y; Print Z
  5. Print X
Question 13 Multiple Choice (Single Answer)

In visual basic, form designer is

  1. a window which is used to write a visual basic code for an application
  2. a small screen which is used to reposition the form of the application, so that it appears in proper place when project is run
  3. a window used for each form to customise the designed interface of the application
  4. a window which contains list of the forms and modules for the current projects
  5. a window which display list of properties settings for a selected form or a control
Question 14 Multiple Choice (Single Answer)

What is the meaning of the following code?

Dim I, sum as integerPrivate Sub command1_click ()sum = 0For i = 3 to 15sum = sum + iNext iLabel1.caption = sum =&cstr(sum)End Sub

  1. This code finds the summation of the numbers from 5 to 15.
  2. This code finds the summation of 10 numbers.
  3. This code prints multipliers of 3 (from 3 to 15).
  4. This code finds the summation of the numbers from 3 to 15.
  5. There is error in the code.
Question 15 Multiple Choice (Single Answer)

In visual basic function, Format(Number, #.00000) returns what value if the number is 12784.34?

  1. It returns 12784.34000.
  2. It returns 12784.34.
  3. It returns 12784.3400000.
  4. It returns 12,784.34000.
  5. It returns #12784.34000.
Question 16 Multiple Choice (Single Answer)

Which of the following codes prints computer five times with its numbering using do-while loop?

  1. Dim i as integerPrivate Sub Command1_Click ()i = 1Do until i > 5Print computer; ii = i + 1LoopEnd Sub
  2. Dim i as integerPrivate Sub Command1_Click ()i = 1Do while i <= 5Print computer; ii = i + 1LoopEnd Sub
  3. Dim i as integerPrivate Sub Command1_Click ()i = 1Do while i <= 8Print computer; ii = i + 1LoopEnd Sub
  4. Dim i as integerPrivate Sub Command1_Click ()i = 1Do while i <= 8Print computer; ii = i + 1;LoopEnd Sub
  5. Dim i as integerPrivate Sub Command1_Click ()i = 1Do while i <= 3Print computer; ii = i + 1;LoopEnd Sub
Question 17 Multiple Choice (Single Answer)

In visual basic, minute() function returns

  1. an integer specifying a whole number between 0 and 60 representing the minute of the hour
  2. a number from 1 to 31 indicating the day portion of a given date
  3. a number from 1 to 12 indicating the month portion of a given date
  4. an integer specifying a whole number between 0 and 59 representing the minute of the hour
  5. a number from 100 to 9999 indicating the year portion of a given date
Question 18 Multiple Choice (Single Answer)

Visual basic string function Replace(Computer, put, pi) returns

  1. computer
  2. syntax error in function
  3. compier
  4. COMPIER
  5. computpier
Question 19 Multiple Choice (Single Answer)

In visual basic, which of the following functions returns a number of characters starting at the given position and on the left hand side, it replaces those characters?

  1. Left$ function
  2. Mid$ function
  3. Right$ function
  4. Format$ function
  5. Str function
Question 20 Multiple Choice (Single Answer)

In visual basic, module is saved with extension

  1. .exe
  2. .vbp
  3. .frm
  4. .bas
  5. .mod
Question 21 Multiple Choice (Single Answer)

Which of the following operators has the first priority?

  1. * [ Multiplication]
  2. / [Division]
  3. ^ [Exponentiation]
  4. + [Addition]
  5. - [Number negation]
Question 22 Multiple Choice (Single Answer)

In visual basic, Len(x) returns

  1. the integer part
  2. number of characters of variable x
  3. absolute of x
  4. integer of x
  5. square root of x
Question 23 Multiple Choice (Single Answer)

Which of the following is the correct visual basic representation of mathematical representation X2 + 4Y?

  1. X ^ 2 + 4 * Y
  2. (X ^ 2) + 4 * Y
  3. X * X + 4 * Y
  4. X * X + (4 * Y)
  5. (X ^ 2) + 4 * X
Question 24 Multiple Choice (Single Answer)

Which property of text box control is used to select text at run-time only?

  1. Text
  2. SelText
  3. SelLength
  4. MultiLine
  5. MaxLength
Question 25 Multiple Choice (Single Answer)

The function form of the message box contains three parameters: message, type and title. Which integer value of type parameter is used to display Abort/Retry/Ignore buttons in the message box?

  1. 0
  2. 4
  3. 2
  4. 1
  5. 5
Question 26 Multiple Choice (Single Answer)

In visual basic, statement Dim month(1 to 12) as integer defines which type of array?

  1. Two dimensional array
  2. Three dimensional array
  3. Dynamic array
  4. One dimensional array
  5. Control array
Question 27 Multiple Choice (Single Answer)

In visual basic, which function returns true if an expression does not contain any valid data?

  1. IsMissing function
  2. IsNull function
  3. IsError function
  4. TypeName function
  5. IsObject function
Question 28 Multiple Choice (Single Answer)

In visual basic, which of the following is useful as a debugging tool?

  1. Local window
  2. Immediate window
  3. Call stack window
  4. Code window
  5. Form layout window
Question 29 Multiple Choice (Single Answer)

In visual basic, which form template is used to give some information to the user?

  1. About Dialog form template
  2. Tip of the Day form template
  3. Splash screen
  4. Login Dialog Form template
  5. Options Dialog
Question 30 Multiple Choice (Single Answer)

In visual basic, which of the following events is fired when you press the key?

  1. KeyUp event
  2. KeyDown event
  3. KeyPress event
  4. GotFocus event
  5. LostFocus event