Home

1000+ Visual Basic MCQ for RRB NTPC [Solved]

Thursday 9th of March 2023

Sharing is caring

1. If the Flag constant for the font common dialog box is cdlCFPrinterFonts then it causes the dialog box to show only the fonts supports by the printer specified by the hdc property
A. True
B. False
C.
D.
Answer : A
2. Now() function will return the current drive and directory you are working on as return value.
A. True
B. False
C.
D.
Answer : B
3. In timer control _____________ is the most important property.
A. Interval.
B. Front
C. backcolor
D.
Answer : A
4. Redim statement is used to :
A. Rename a variable.
B. Rename an array.
C. Redimension an array.
D.
Answer : C
5. Currency variable stores fixed point numbers with :
A. 2 decimal digits.
B. 3 decimal digits.
C. 4 decimal digits.
D. 6 decimal digits.
Answer : C
6. which should be included when an application is used without any forms
A. subroutines
B. function
C. main
D. sub-main
Answer : D
7. CommonDialog control is the default control that anyone can find in the toolbar when a new project is started
A. True
B. False
C.
D.
Answer : B
8. Data1.Recordset.FindFirst "State=NY"
The above code will find the record in a given database

A. Find the first record in the given database
B. Find the first record in the given database in which the state is NY.
C. The above command will find a record very fast where the state is NY
D. None of the above
Answer : B
9. In runtime it is not possible to change the form size.
A. True
B. False
C.
D.
Answer : B
10. RichTextBox1.BulletIndent=5 ; what will be the effect of this code if used in any program
A. It will set the bulleted indentation by the specified value
B. It will create a list of bullet of 5 items
C. All of the above
D.
Answer : A
11. To get the property window in visual basic you have to press
A. F6
B. F3
C. F4
D. F5
Answer : C
12. ABS() function will generate a hole value when used with a number with fraction part (ex: 125.26598)
A. True
B. False
C.
D.
Answer : A
13. What will be the output when the statements below will execute :
Dim a as integer
a=0
while(a<5)
print a
a=a+1
end

A. It will generate the output like 0 1 2 3 4
B. It will generate a runtime error
C. It will generate a compiler error
D. It will display nothing
Answer : C
14. When using do loop-while statement then the statements within the loop body will be executed only once if the condition does not fulfilled
A. True
B. False
C.
D.
Answer : A
15. The amount of text any one can place in text box is maximum 64 kb.
A. True
B. False
C.
D.
Answer : A
16. Say there is a string "Ramcharan"; when someone using Mid() function like MID("Ramcharan",2) then what will be the output:
A. "Ra"
B. "Ch"
C. "Amcharan"
D. None of the above
Answer : C
17. Flag property is used to adjust the function of each common dialog box
A. True
B. False
C.
D.
Answer : A
18. Activate event is called before load event
A. True
B. False
C.
D.
Answer : B
19. It is possible to build an application without using any form:
A. True
B. False
C.
D.
Answer : A
20. In database application, any field does not contain any values can be recognized by:
A. Nothing value.
B. Null value.
C. Error value.
D. Empty value.
Answer : B
21. To enable apply button in dialog box ; flag value should be set to
A. cdlCFApply
B. cdlcfTTOnly
C. cdcclHelpButton
D. None of the above
Answer : A
22. Suppose there is a data control named data1. What will be the effect if the following code is inserted
A. Data1.recordset.movefirst
B. The record pointer will move to the first record of the record set
C. The pointer will move to the first record of the original table that contains the data
D. It will refresh the recordset
Answer : B
23. In case of visual basic, IDE means :
A. Internal Database Engineering.
B. Integrated Database Environment.
C. Integrated Development Environment.
D.
Answer : C
24. If there is a control array of label for 10 elements, then what will be the fifth element in the array?
A. label(5)
B. label(3)
C. label(4)
D. None
Answer : C
25. In a programme body :
Private sub form_load()
X=inputbox("First No. :")
Y=inputbox("Second No. :")
Z=val(X) +val(Y)
Print Z
End sub
What will be the output ?

A. The summation of two numbers given in two input box
B. It will show the numbers given in the input box side by side
C. It will show nothing
D. None of the above
Answer : C
26. Sorted property of list box control is a design time property and cannot be changed in runtime.
A. True
B. False
C.
D.
Answer : A
27. Time() function is used to recover date & time.
A. True
B. False
C.
D.
Answer : B
28. Min and Max property can be used with Font common dialog box to determine
A. To controlling dialog box size
B. The minimum and maximum size displayed in the size list
C. None of the above
D.
Answer : B
29. Sorted property of list box control is a design time property and cannot be changed in runtime.
A. True
B. False
C.
D.
Answer : A
30. Visual Basic has ____________ number of editions
A. 3
B. 4
C. 5
D. 6
Answer : A
31. It is possible to pass different number parameters to a function when call the function on different time.
A. To do this one can use in the parameter list of that function
B. paramarray keyword with the array declaration
C. argument should be passed as array
D. none of the above
Answer : B
32. If the user wants to select the multiple files from file open and filesave dialog boxes then the flag must be set to
A. cdlOFNMultiselsectAllow
B. cdlOFNAllowMultiselect
C. It is not possible to select more than one file at a time
D. None
Answer : B
33. Visual Basic produce:
A. 3 types of executable code.
B. 2 types of executable code.
C. 4 types of executable code
D. none of the above.
Answer : B
34. Isnull(), IsEmpty() determines weather any variable has been initialize or not
A. True
B. False
C.
D.
Answer : A
35. In visual basic, number of loop control structure is _____________.
A. 4
B. 5
C. 6
D. 7
Answer : C
36. Instr$(text1.text,"visual") will returns :
A. No. of times the string "visual" is present in the string in text1.text.
B. It puts the control where it finds the text "visual" in the string given in text1.text.
C. First occurrence of the text "visual" within the string given in text1.text
D. None of the above.
Answer : C
37. The title of the dialog box can be changed.
A. True
B. False
C.
D.
Answer : A
38. What is the default value of MaxLength property of text box control?
A. 255 characters
B. 10 characters
C. 0 characters
D. Any of the above
Answer : C
39. The default startup object can not be changed in a project
A. True
B. False
C.
D.
Answer : B
40. When someone uses the code like list1.list(1); then it will return the first item of the list box control.
A. True
B. False
C.
D.
Answer : B
41. The other Single Document Interface forms are by default child of MDI form when MDI form is inserted.
A. True
B. False
C.
D.
Answer : B
42. To break a loop abnormally when satisfying a condition, we can use
A. Break statement
B. Exit statement
C. Both i & ii could be used.
D. None of the above.
Answer : B
43. CommonDialogs control is visible at runtime
A. True
B. False
C.
D.
Answer : B
44. which control structure are working under false condition
A. do-while loop & do loop-while
B. while-wend & for loop
C. do-while loop & while wend loop
D. do-until loop & do loop-until
Answer : D
45. List count property returns total number of items in list box control.
A. True
B. False
C.
D.
Answer : A
46. Constants are processed faster than variables :
A. True
B. False
C.
D.
Answer : A
47. By default 'Dim myvar' this statement:
A. allocates memory for integer variable
B. allocates memory for variant variable
C. allocates memory for Double variable
D. allocates memory for Boolean variable
Answer : B
48. You can get a dropdown list and as well as can add some text directly to ____________ Control.
A. listbox
B. command
C. Combo Box.
D. none of this
Answer : C
49. cell alignment property can be used to align the cells with different alignment style
A. True
B. False
C.
D.
Answer : A
50. Time variable is used to store date and time in visual basic
A. True
B. False
C.
D.
Answer : B

Sharing is caring