Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

Visual Basic Exam 2 Questions and Answers (2025/2026 Edition) – Complete File Handling, Database Access, OOP, and ASP.NET Prep Guide

Rating
-
Sold
-
Pages
36
Grade
A+
Uploaded on
14-05-2025
Written in
2024/2025

This graded A+ document contains the latest Visual Basic Exam 2 questions and answers for the 2025/2026 academic cycle. It covers essential programming topics such as file handling, SQL queries, object-oriented programming, array operations, form controls, and ASP.NET web development. Includes multiple-choice questions and coding exercises for structured learning. Ideal for CS students preparing for exams in VB.NET, database interaction, and GUI/web application development.

Show more Read less
Institution
VISUAL BASIC
Course
VISUAL BASIC

Content preview

1 | Page


VISUAL BASIC EXAM 2 QUESTIONS & ANSWERS
GRADED A+/NEWEST UPDATE Questions and
Correct Answers/ Latest Update / Already Graded
To retain data between different times that the program runs, an application
must have

a way of the data in a file.

a. Adding

b. Encrypting

c. Saving

d. Deleting

Ans: c.Saving


A file is like a stream of data that must be read from its beginning to its end.

a. direct access

b. binary format

c. sequential access

d. direct format

Ans: c.sequential access


The method is used to write data to a file and then writes a newline character

immediately after the data.

a. PrintLine

b. WriteLine

c. WriteNewLine

© 2025/ 2026 | ® All rights reserved

, 2 | Page

d. PrintNewLine

Ans: B


4. Assume the file address.txt contains the following lines:

Bob Johnson

Somewhere USA

Which of the following code segments will read the data from the file and put the
data

into two variables named strName, and strCity.

a. Dim addressFile As System.IO.StreamReader

addressFile = addressFile.OpenText("address.txt")

strName = addressFile.ReadLine()

strCity = addressFile.ReadLine()

addressFile.Close()

CS2453 - Exam 3 Review Page 2 of 14

b. Dim addressFile As System.IO.StreamReader

addressFile = System.IO.File.OpenText("address.txt")

strName = addressFile.ReadLine()

strCity = addressFile.ReadLine()

addressFile.Close()

c. Dim addressFile As System.IO.StreamReader

addressFile = OpenText("address.txt")

strName = addressFile.ReadLine()


© 2025/ 2026 | ® All rights reserved

, 3 | Page

strCity = addressFile.ReadLine()

Close()

d. Dim addressFile As System.IO.StreamReader

addressFile = System.IO.File.OpenText("address.txt")

strName = addressFile.Input ()

strCity = addressFile.

Ans: B


5. When opening a file you should use this method to determine whether a file
exists

before you attempt to open it

a. File.Exists

b. IO.Exists

c. System.IO.Exists

d. System.File.Exists

Ans: A


6. This control can display a standard Windows Open dialog box.

a. OpenDialog

b. OpenFileDialog

c. OpenWindow

d. OpenWindowDialog

Ans: B


© 2025/ 2026 | ® All rights reserved

, 4 | Page

7. Which of the following statements does the following?

Formats a line of text to have the word "Name" in the first column, which is 20

characters wide, and have the word "Address" in the second column, which is

also 20 characters wide.

a. String.Format("{0, 20}{1, 20}", "Name", "Address")

b. String.Format("{ 20}{ 20}", "Name", "Address")

c. String.Format(20, 20, "Name", "Address")

d. String.Format(20, 40, "Name", "Address")

CS2453 - Exam 3 Review Page 3 of 14

Ans: A


8. To left justify the columns in the String.Format method you would use

preceding the numbers for the column width.

a. a + sign

b. an & symbol

c. a - sign

d. a # symbol

Ans: C


9. All of the following steps must be taken when a file is used by an application
except

a. The file must be opened. If the file does not exist, opening it means

creating it.


© 2025/ 2026 | ® All rights reserved

Written for

Institution
VISUAL BASIC
Course
VISUAL BASIC

Document information

Uploaded on
May 14, 2025
Number of pages
36
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$14.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Expert1 Chamberlian School of Nursing
View profile
Follow You need to be logged in order to follow users or courses
Sold
65
Member since
1 year
Number of followers
3
Documents
7578
Last sold
12 hours ago
Expert1

Welcome to Expert1 – Your Trusted Study Partner! Struggling to prepare for exams or ace your coursework? At Expert1, I provide top-tier, exam-ready study materials designed to help you succeed with confidence. All notes are created with clarity, precision, and a deep understanding of the curriculum to ensure you save time and score high. What You’ll Find Here: High-quality summaries and exam packs Past paper solutions with detailed explanations Notes aligned with your syllabus (A-levels, university, etc.) Resources from top-performing students Trusted by hundreds of students to boost their grades!

Read more Read less
4.5

8 reviews

5
7
4
0
3
0
2
0
1
1

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions