Skip to main content

Visual Basic — Part 2 MCQs with Explanations

Practice high-yield Computer Science & IT MCQs on Visual Basic — Part 2 with worked academic solutions for PPSC, FPSC, CSS, PMS, NTS.

Questions
40
Difficulty Level
Exam-Level
Target Exams
PPSC, FPSC, CSS...
Estimated Time
48 mins
Exam-Level PPSC FPSC CSS PMS NTS
Verified for Commission Syllabus • Oct 14, 2026
40

Verified Practice Questions

Interactive test mode with detailed academic worked solutions

Live Progress | 0/40 answered
✓ 0 correct ✗ 0 wrong 0% score
Question 1 of 40
★ PPSC ★ FPSC

A . . . . . . . . allows you to select from a list of choices.

Question 2 of 40
★ PPSC ★ FPSC

What is the array of these statements? Dim intScores As Integer = {78, 83, 75, 90} Array.reverse (intScores)

Question 3 of 40
★ PPSC ★ FPSC

The select case statement ends with . . . . . . . .

Question 4 of 40
★ PPSC ★ FPSC

Which of the following is used to display a message box in Visual Basic?

Question 5 of 40
★ PPSC ★ FPSC

What is the value of len in the following Visual Basic code? Dim strVB() As String = {"Example", "Visual Basic", "VB.Net", "Visual Studio"} Dim len As Integer len = strVB.Length()

Question 6 of 40
★ PPSC ★ FPSC

In the Visual Basic application, which of the following are listed in a properties window?

Question 7 of 40
★ PPSC ★ FPSC

The . . . . . . . . include all widow property, form, project ,form layout .

Question 8 of 40
★ PPSC ★ FPSC

Which of the following selects the Cat item, which appears third in the cboAnimal control?

Question 9 of 40
★ PPSC ★ FPSC

A variable declared as . . . . . . . . type can store both values and it can store date values 01/01/0100 up to 12/31/9999

Question 10 of 40
★ PPSC ★ FPSC

What happens when maximize box is set to true?

Question 11 of 40
★ PPSC ★ FPSC

. . . . . . . . is for displaying a list of directories or folders in a selected drive

Question 12 of 40
★ PPSC ★ FPSC

MDI is used to work as parents, its main property is . . . . . . . . , all the forms are open within MDI

Question 13 of 40
★ PPSC ★ FPSC

What does the Start Position Property determine?

Question 14 of 40
★ PPSC ★ FPSC

In . . . . . . . . , The size of array always remains the same-size doesn't change during the program execution.

Question 15 of 40
★ PPSC ★ FPSC

Designers usually include graphics to . . . . . . . . a portion of screen.

Question 16 of 40
★ PPSC ★ FPSC

What will be assigned to the dblAvg variable after the code has been executed? Do While intSub < 4 intTotal = intTotal + intNums(intSub) intSub = intSub + 1 Loop dblAvg = intTotal / intSub – 1 Dim intNums() As Integer = {10, 5, 7, 2}. The intTotal, intSub, and dblAvg variables contain the number 0 before the loops are processed.

Question 17 of 40
★ PPSC ★ FPSC

A control is locked using . . . . . . . .

Question 18 of 40
★ PPSC ★ FPSC

The methods which loads the form into memory . . . . . . . . it on screen.

Question 19 of 40
★ PPSC ★ FPSC

Microsoft ActiveX Data Control 6 is insert from component , it is used to load ADO control.

Question 20 of 40
★ PPSC ★ FPSC

VB is tool that allows you to develop application in . . . . . . . .

Question 21 of 40
★ PPSC ★ FPSC

A . . . . . . . . resembles a table.

Question 22 of 40
★ PPSC ★ FPSC

By which button you can display the additional items?

Question 23 of 40
★ PPSC ★ FPSC

. . . . . . . . is a numeric variable used for accumulating something.

Question 24 of 40
★ PPSC ★ FPSC

You refer to the structure variable by its . . . . . . . .

Question 25 of 40
★ PPSC ★ FPSC

. . . . . . . . is used to separate related controls from other controls in the form.

Question 26 of 40
★ PPSC ★ FPSC

In the following code, the while loop will execute if strId would have been . . . . . . . . Do While strId Like "###*"

Question 27 of 40
★ PPSC ★ FPSC

VB is the example of. . . . . . . .software .

Question 28 of 40
★ PPSC ★ FPSC

The . . . . . . . . allows us to browse through the various properties, events and methods that are made available to us

Question 29 of 40
★ PPSC ★ FPSC

What will be in Msg after the following code is evaluated? If 3>6 AndAlso 7>4 then Msg="Hi" Else Msg="Bye" EndIf

Question 30 of 40
★ PPSC ★ FPSC

The intSales array is declared as follows: Dim intSales() As Integer = {10000, 12000, 900, 500, 20000}. The statement intSales(3) = intSales(3) + 10 will .

Question 31 of 40
★ PPSC ★ FPSC

The . . . . . . . . indicates the purpose of the menu element.

Question 32 of 40
★ PPSC ★ FPSC

. . . . . . . . structure can handle conditions with multiple outcomes in an easier manner

Question 33 of 40
★ PPSC ★ FPSC

The . . . . . . . . is used to show quick reference to the various elements of a project namely form, classes and modules

Question 34 of 40
★ PPSC ★ FPSC

The . . . . . . . . keyword indicates that an application can set the property's value, but it cannot retrieve the value.

Question 35 of 40
★ PPSC ★ FPSC

What does namespace contain?

Question 36 of 40
★ PPSC ★ FPSC

if condition is end by . . . . . . . .

Question 37 of 40
★ PPSC ★ FPSC

The number that appears after the period in the . . . . . . . . value indicates the order in which the controls were added to the groupbox.

Question 38 of 40
★ PPSC ★ FPSC

. . . . . . . . is used to add a GroupBox to the interface.

Question 39 of 40
★ PPSC ★ FPSC

The . . . . . . . . validator is used to verify that control contains data verify that an entry passes the specified validation logic.

Question 40 of 40
★ PPSC ★ FPSC

The instructions in a . . . . . . . . loop are always processed at least once, whereas the instructions in a . . . . . . . . loop might not be processed at all.

✓ Link copied to clipboard
Continue Your Practice

Advanced Mapreduce Concepts — Part 1

Master the next curriculum module with 40 exam-standard MCQs.

Next Practice Set →

💡 Examiner's Advisory for Computer Science & IT

In competitive commission exams (FPSC, PPSC, KPPSC, SPSC, CSS, PMS), questions are frequently phrased with distractor options designed to catch rote learners. Whenever you answer an MCQ, read the Detailed Academic Explanation and Conceptual Anchor to understand why the remaining options are incorrect.

More Modules in Computer Science & IT

View All →
📚

Study Guides

Topic summaries and syllabus breakdown

Explore Guides →
🎯

Complete Library

Search through 78,000+ verified MCQs

Browse Library →
📱

Mobile App

Offline mock tests and instant bookmarks

Get Mobile App →