Skip to main content

Visual Basic Programming Practice Questions - 429 Verified Questions

Page 1


Visual Basic Programming Practice Questions

Course Introduction

Visual Basic Programming introduces students to the fundamentals of programming using the Visual Basic language. The course covers essential concepts such as variables, data types, control structures, functions, and object-oriented programming principles within the Visual Basic environment. Students will learn to design graphical user interfaces (GUIs), manage events, and interact with databases through practical, hands-on projects. By the end of the course, students will be able to develop basic desktop applications and understand problem-solving strategies using Visual Basic, preparing them for further study or entry-level positions in software development.

Recommended Textbook

Starting Out With Visual Basic 7th Edition by Tony Gaddis

Available Study Resources on Quizplus

12 Chapters

429 Verified Questions

429 Flashcards

Source URL: https://quizplus.com/study-set/3925 Page 2

Chapter 1: Introduction to Programming and Visual Basic

Available Study Resources on Quizplus for this Chatper

40 Verified Questions

40 Flashcards

Source URL: https://quizplus.com/quiz/78277

Sample Questions

Q1) Which of the following is an example of a binary number?

A) 324

B) 123

C) 101

D) 202

Answer: C

Q2) Which of the following is an example of a control?

A) Form

B) TextBox

C) Button

D) all of the above

Answer: D

Q3) In Visual Basic we work with objects, which have ________________.

A) programmer preference

B) projects and solutions

C) classes and actions

D) properties and methods

Answer: D

To view all questions and flashcards with answers, click on the resource link above. Page 3

Chapter 2: Creating Applications With Visual Basic

Available Study Resources on Quizplus for this Chatper

36 Verified Questions

36 Flashcards

Source URL: https://quizplus.com/quiz/78276

Sample Questions

Q1) When you select a control on a form in the Designer window, ____________.

A) its color changes to dark blue

B) the tool box will be visible

C) its sizing handles appear

D) the project will automatically be saved

Answer: C

Q2) You can display the Code window in all of the following ways except ____________.

A) Click the View Code button in the Solution Explorer window

B) Click Project on the menu bar, and then click Show all files

C) Click View on the menu bar, and then select Code

D) Press the F7 key

Answer: B

Q3) If the Visible property of a control is set to False, it ______in the Designer window.

A) is grayed out

B) is no longer displayed

C) continues to be shown

D) becomes inactive

Answer: C

To view all questions and flashcards with answers, click on the resource link above.

Page 4

Chapter 3: Variables and Calculations

Available Study Resources on Quizplus for this Chatper

41 Verified Questions

41 Flashcards

Source URL: https://quizplus.com/quiz/78275

Sample Questions

Q1) You can perform all of the following actions with variables except:

A) Copy and store values entered by the user, so they may be manipulated

B) Assign a variable's value to a constant

C) Perform arithmetic on values

D) Remember information for later use in the program

Answer: B

Q2) A form's Load event takes place when the user first clicks on the form at run time.

A)True

B)False

Answer: False

Q3) What is the result after evaluating the following expression: 24 MOD 9

A) 6

B) 3

C) 2

D) 5

Answer: A

To view all questions and flashcards with answers, click on the resource link above. Page 5

Chapter 4: Making Decisions

Available Study Resources on Quizplus for this Chatper

39 Verified Questions

39 Flashcards

Source URL: https://quizplus.com/quiz/78274

Sample Questions

Q1) The logical operators (And, Or, Xor, Not) combine two or more Boolean expressions.

A)True

B)False

Q2) What value will be assigned to intIndex when the following statements execute?

<b>Dim strTarget As String = "asdsakfljfdgasldfjdl"

Dim intIndex = strTarget.IndexOf("as", 1, 10)</b>

A) 12

B) 13

C) 0

D) -1

Q3) Which of the following operators takes a Boolean expression and reverses its logical value?

A) Xor

B) And

C) < >

D) Not

Q4) The If Then Else statement follows only one of the two paths.

A)True

B)False

To view all questions and flashcards with answers, click on the resource link above. Page 6

Chapter 5: Lists and Loops

Available Study Resources on Quizplus for this Chatper

36 Verified Questions

36 Flashcards

Source URL: https://quizplus.com/quiz/78273

Sample Questions

Q1) Which property determines the amount of time, in milliseconds, that elapses between the user pointing the mouse at a control and the tool tip text's appearance?

A) FinalDelay

B) ReshowDelay

C) InitialDelay

D) AutoPopDelay

Q2) The first item in a ListBox has an index of __________.

A) -1

B) 0

C) 1

D) Items.Count

Q3) All of the following are valid <b>ComboBox</b> style properties, except

A) Drop-Down Combo Box

B) Simple Combo Box

C) List Combo Box

D) Drop-Down List Combo Box

To view all questions and flashcards with answers, click on the resource link above.

Chapter 6: Procedures and Functions

Available Study Resources on Quizplus for this Chatper

31 Verified Questions

31 Flashcards

Source URL: https://quizplus.com/quiz/78272

Sample Questions

Q1) What is wrong with the following GetName procedure?

<b>Sub GetName(ByVal strName As String)

StrName = InputBox("Enter your Name:")

End Sub</b>

A) The procedure is missing a Return statement.

B) GetName is a reserved word and cannot be used as a name of a procedure.

C) strName will be modified, but all changes will be lost when the procedure ends.

D) The syntax for the call to InputBox is incorrect.

Q2) When calling a procedure, passed arguments and declared parameters must agree in all of the following ways except __________.

A) the order of arguments and parameters must correspond

B) the names of the arguments and parameters must correspond

C) the types of the arguments and parameters must correspond

D) the number of arguments and the number of parameters must be the same

Q3) Which of the following can be returned by a function?

A) String values

B) Integer values

C) Boolean values

D) All of the above

To view all questions and flashcards with answers, click on the resource link above.

Page 8

Chapter 7: Multiple Forms, Modules, and Menus

Available Study Resources on Quizplus for this Chatper

35 Verified Questions

35 Flashcards

Source URL: https://quizplus.com/quiz/78271

Sample Questions

Q1) When a ______form is displayed, no other form in the application can receive the focus until the form is closed.

A) hidden

B) modeless

C) modal

D) show

Q2) A form's ______event is triggered when the user switches to the form from another form or another application.

A) form load

B) activated

C) got focus

D) click

Q3) Which of the following is not true about a form's class declaration?

A) It contains a detailed description of a form.

B) It's similar to a blueprint for a house.

C) It creates an instance of the form.

D) It contains the form's event handlers.

Q4) Any form in a Windows Forms application can be designated as the startup form.

A)True

B)False

Page 9

To view all questions and flashcards with answers, click on the resource link above.

Chapter 8: Arrays and More

Available Study Resources on Quizplus for this Chatper

34 Verified Questions

34 Flashcards

Source URL: https://quizplus.com/quiz/78270

Sample Questions

Q1) Which of the following code segments will copy the values of a 5 element array named intOldValues into another 5 element array named intNewValues?

A) intIndex = 1 Do While intIndex < =5

IntNewValues(intIndex) = intOldValues(intIndex)

IntIndex = intIndex + 1

Loop

B) intIndex = 0 Do While intIndex < 5

IntNewValues(intIndex) = intOldValues(intIndex)

IntIndex = intIndex + 1

Loop

C) For intIndex = 1 To 5 intNewValues(intIndex) = intOldValues(intIndex)

Next intIndex

D) For intIndex = 0 To 4 intOldValues(intIndex) = intNewValues(intIndex)

Next intIndex

Q2) In Visual Basic you can use the ______data type to hold a set of items.

A) Group

B) List

C) Array

D) Object

To view all questions and flashcards with answers, click on the resource link above.

Chapter 9: Files, Printing, and Structure

Available Study Resources on Quizplus for this Chatper

36 Verified Questions

36 Flashcards

Source URL: https://quizplus.com/quiz/78269

Sample Questions

Q1) The StreamWriter's CreateText method will _____________.

A) create a new file or replace an existing one

B) append text at the end of the existing file

C) insert text at the beginning of the file

D) maintain the data for an existing file

Q2) Reports with columnar data should not use __________.

A) proportionally spaced fonts

B) the Courier New font

C) monospaced fonts

D) all of the above

Q3) Visual Basic allows you to use a(n) statement to eliminate the need to prefix class names with their namespace names.

A) Include

B) With

C) Inherits

D) Imports

To view all questions and flashcards with answers, click on the resource link above.

11

Chapter 10: Working With Databases

Available Study Resources on Quizplus for this Chatper

32 Verified Questions

32 Flashcards

Source URL: https://quizplus.com/quiz/78268

Sample Questions

Q1) A database _____________is organized into rows and columns.

A) grid

B) matrix

C) table

D) spreadsheet

Q2) All of the following are true about SQL except __________.

A) SQL provides a standard means of interacting with a database.

B) SQL consists of several keywords.

C) SQL stands for "Sequenced Query Language"

D) SQL is an industry-standard language.

Q3) ______allows individual controls such as text boxes and labels to be linked to and automatically display the contents of a data source.

A) Data binding

B) A table adapter

C) A data grid

D) A data relation

To view all questions and flashcards with answers, click on the resource link above.

Page 12

Chapter 11: Developing Web Applications

Available Study Resources on Quizplus for this Chatper

33 Verified Questions

33 Flashcards

Source URL: https://quizplus.com/quiz/78267

Sample Questions

Q1) What does a Web browser do for an end user?

A) Interprets HTML

B) Connects to Web sites

C) Hosts a Web site

D) A and B are correct

Q2) A web form can be identified by its ______filename extension.

A) .asp

B) .aspx.vb

C) .aspx

D) .config

Q3) ASP.NET controls are more powerful than HTML controls because __________.

A) more fonts are available

B) graphics can be embedded in them

C) they use event handlers to carry out actions at runtime

D) powerful hyperlinks can be embedded in them

Q4) Which is not a valid URL protocol?

A) ftp://

B) http://

C) https://

D) htm://

Page 13

To view all questions and flashcards with answers, click on the resource link above.

Chapter 12: Classes, Collections, and Inheritance

Available Study Resources on Quizplus for this Chatper

36 Verified Questions

36 Flashcards

Source URL: https://quizplus.com/quiz/78266

Sample Questions

Q1) Which of the following displays a window that lets you browse the classes available to your project?

A) Component Browser

B) Class Browser

C) Object Browser

D) Module Browser

Q2) The ______access specifier permits class members to be accessed by statements both outside the class and outside the assembly.

A) Public

B) Protected

C) Private

D) Friends

Q3) Class members declared with this access specifier are like private members, except they may be accessed by methods and property procedures in derived classes.

A) Private

B) Public

C) Protected

D) SubClass

To view all questions and flashcards with answers, click on the resource link above.

14

Turn static files into dynamic content formats.

Create a flipbook
Visual Basic Programming Practice Questions - 429 Verified Questions by Quizplus - Issuu