Home

Visual Basic MCQ Question with Answer

Visual Basic MCQ with detailed explanation for interview, entrance and competitive exams. Explanation are given for understanding.

Download Visual Basic MCQ Question Answer PDF

Question No : 57
By default 'Dim myvar' this statement:

allocates memory for integer variable
allocates memory for variant variable
allocates memory for Double variable
allocates memory for Boolean variable

Question No : 58
Suppose there are two forms; form1 and form2 ; if there are codes like : In form1.active event
Form2.show
And in form2.active event
Form1.show
Then what will be the output ?

Two forms will be just showed.
Two forms will be showed and the control will passed continuously to each other.
Nothing will be displayed
None of the above.

Question No : 59
A single function of visual basic takes:

Fixed number of parameters
Unlimited number of parameters
All of the above
None of the above

Question No : 60
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 ?

The summation of two numbers given in two input box
It will show the numbers given in the input box side by side
It will show nothing
None of the above

Question No : 61
when using 'do until-loop' statement as stated below
I=10
Do until I>5
Print I
I=I+1
Loop
This statement will print

it will generate a run time error
no output will be shown
10 11 12 13 14 15
none of the above

Question No : 62
which control structure are working under false condition

do-while loop & do loop-while
while-wend & for loop
do-while loop & while wend loop
do-until loop & do loop-until

Question No : 63
what will be the output of the code below :
private sub command_click()
dim I as integer
I=0
Do
Print I
Loop until I>10
End sub

it will generate compile time error
it will generate runtime error
it is an endless loop
0 1 2 3 4 5 6 7 8 9 10