Home

Visual Basic 1000+ MCQ with answer for UPSC CSE

Thursday 9th of March 2023

Sharing is caring

1. A single function of visual basic takes:
A. Fixed number of parameters
B. Unlimited number of parameters
C. All of the above
D. None of the above
Answer : B
2. 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
3. It is possible to declare 'Dynamic Array' in visual basic.
A. True
B. False
C.
D.
Answer : A
4. 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
5. To add the commondialog control to any project one has to include it from
A. File menu->component->Microsoft Common Dialog Control 6.0
B. Project menu->Component-> Microsoft Common Dialog Control 6.0
C. Component menu->project-> Microsoft Common Dialog Control 6.0
D. None of the above
Answer : B
6. To get the property window in visual basic you have to press :
A. F3
B. F6
C. F4
D. F6
Answer : C
7. Through which property of option button control one can change the font color of the caption.
A. Back color
B. Font color
C. Fore color
D. None
Answer : C
8. Which property of list box control reports the number of selected items.
A. ListIndex
B. Selected
C. Selcount
D. NewIndex
Answer : C
9. Terminate is a valid event in form operation
A. True
B. False
C.
D.
Answer : A
10. To get the property window in visual basic you have to press
A. F6
B. F3
C. F4
D. F5
Answer : C
11. The size of 'Boolean' data type is :
A. 1 Byte.
B. 2 Bytes.
C. 4 Bytes.
D. 8 Bytes.
Answer : B
12. If you want a list box control with check box option, which property of list box control you will have to change.
A. Check box property
B. Check style property
C. Style property
D. None
Answer : C
13. Redim statement is used to :
A. Rename a variable.
B. Rename an array.
C. Redimension an array.
D.
Answer : C
14. 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
15. Flag property is used to adjust the function of each common dialog box
A. True
B. False
C.
D.
Answer : A
16. The extension name of a Visual Basic form is _____________.
A. .frm
B. .txt
C. .prj
D. .vbp
Answer : A
17. In visual basic you can draw something in
A. Picture box control.
B. Image control.
C. Shape control.
D.
Answer : A
18. 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
19. You can get the ASCII value of any character or number by using
A. ASC() function
B. ASCII() function
C. There is no function to get the ascii value.
D.
Answer : A
20. 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
21. 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
22. The default startup object can not be changed in a project
A. True
B. False
C.
D.
Answer : B
23. In _______________ control you can get only drop-down list of the content but cannot add directly anything to that control.
A. text box
B. combo box
C. List Box Control
D.
Answer : C
24. In visual basic 'Break' statement could be used along with "Select Case"
A. True
B. False
C.
D.
Answer : B
25. While running an application you can change the value of any variable and see it's effect through ___________ window.
A. intermediate
B. Immediate
C. current
D.
Answer : B
26. It is possible to change the password character property of text box control at run time.
A. True
B. False
C.
D.
Answer : B
27. Delete method of the recordset of Data Control or Data Access Object is delete the record which is pointed out by the record pointer.
A. True
B. False
C.
D.
Answer : A
28. To draw a form on the screen which event is being called up
A. Draw Event
B. Load Event
C. Paint Event
D. Either i or iii
Answer : C
29. Now() function will return the current drive and directory you are working on as return value.
A. True
B. False
C.
D.
Answer : B
30. Sort is a method by which elements can be sorted in flexgrid control
A. True
B. False
C.
D.
Answer : B
31. 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
32. Time() function is used to recover date & time.
A. True
B. False
C.
D.
Answer : B
33. In timer control _____________ is the most important property.
A. Interval.
B. Front
C. backcolor
D.
Answer : A
34. Activate event is called before load event
A. True
B. False
C.
D.
Answer : B
35. The full form of IIS is :
A. Indian Institute of Science.
B. Internet Information Service
C. Industrial Information Services.
D.
Answer : B
36. Time variable is used to store date and time in visual basic
A. True
B. False
C.
D.
Answer : B
37. 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
38. Print' statement can be used to print any statement on the screen.
A. True
B. False
C.
D.
Answer : A
39. The maximum length of a variable is _____________ characters.
A. 255
B. 254
C. 256
D. 257
Answer : A
40. 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
41. Visual Basic has ____________ number of editions
A. 3
B. 4
C. 5
D. 6
Answer : A
42. Dialog title property is used to change the title of any dialog box
A. True
B. False
C.
D.
Answer : A
43. List count property returns total number of items in list box control.
A. True
B. False
C.
D.
Answer : A
44. It is possible to access a menu without using mouse, to access the menu ;pressing the Ctrl key and the letter assigned to access the menu
A. True
B. False
C.
D.
Answer : B
45. 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
46. It is not possible to change the back color property of option button control at run time.
A. True
B. False
C.
D.
Answer : B
47. In case of visual basic, IDE means :
A. Internal Database Engineering.
B. Integrated Database Environment.
C. Integrated Development Environment.
D.
Answer : C
48. CommonDialogs control is visible at runtime
A. True
B. False
C.
D.
Answer : B
49. In runtime it is not possible to change the form size.
A. True
B. False
C.
D.
Answer : B
50. Function Add(Num1 as integer, Num2 as integer) as integer
Add=Num1+Num2
Num1=0
Num2=0
End function
This body is an example of calling up a function by:

A. By optional argument.
B. By value.
C. By reference.
D.
Answer : C

Sharing is caring