Escrito por estudiantes que aprobaron Inmediatamente disponible después del pago Leer en línea o como PDF ¿Documento equivocado? Cámbialo gratis 4,6 TrustPilot
logo-home
Examen

VISUAL BASIC EXAM 2 QUESTIONS AND ANSWERS 100% PASS

Puntuación
-
Vendido
-
Páginas
28
Grado
A+
Subido en
12-05-2025
Escrito en
2024/2025

VISUAL BASIC EXAM 2 QUESTIONS AND ANSWERS 100% PASS 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 ntial 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 d. PrintNewLine - ANS B ©THESTAR 2025 ALL RIGHTS RESERVED 4. Assume the file 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("") 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("") strName = addressFile.ReadLine() strCity = addressFile.ReadLine() addressFile.Close() c. Dim addressFile As System.IO.StreamReader addressFile = OpenText("") strName = addressFile.ReadLine() strCity = addressFile.ReadLine() Close() d. Dim addressFile As System.IO.StreamReader addressFile = System.IO.File.OpenText("") strName = addressFile.Input () strCity = addressFile. - ANS B 5. When opening a file you should use this method to determine whether a file exists ©THESTAR 2025 ALL RIGHTS RESERVED 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 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

Mostrar más Leer menos
Institución
VISUAL BASIC
Grado
VISUAL BASIC

Vista previa del contenido

©THESTAR 2025 ALL RIGHTS RESERVED




VISUAL BASIC EXAM 2 QUESTIONS
AND ANSWERS 100% PASS


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

d. PrintNewLine - ANS B

, ©THESTAR 2025 ALL RIGHTS RESERVED

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()
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

, ©THESTAR 2025 ALL RIGHTS RESERVED

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


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

Escuela, estudio y materia

Institución
VISUAL BASIC
Grado
VISUAL BASIC

Información del documento

Subido en
12 de mayo de 2025
Número de páginas
28
Escrito en
2024/2025
Tipo
Examen
Contiene
Preguntas y respuestas

Temas

$13.99
Accede al documento completo:

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Conoce al vendedor

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
TheStar Florida State University
Ver perfil
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
699
Miembro desde
2 año
Número de seguidores
178
Documentos
26237
Última venta
19 horas hace
Stuvia Prodigy

Tested, Verified and Updated Study Materials with 100% Guaranteed Success.

3.8

136 reseñas

5
60
4
25
3
27
2
5
1
19

Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes