Visual Basic Questions and Answers – Testing and Debugging Application

This set of Visual Basic Multiple Choice Questions & Answers (MCQs) focuses on “Testing and Debugging Application”.

1. __________ data is a data that the application is expecting the user to enter.
a) Valid
b) Invalid
c) Numeric
d) Character
View Answer

Answer: a
Explanation: You test an application by starting it and entering some sample data. Sample data can be both valid and invalid. Valid data is the data that the application is expecting the user to enter whereas invalid data is the data that the application is not expecting the user to enter.

2. __________ refers to the process of locating and correcting errors.
a) Testing
b) Debugging
c) Retransforming
d) Correcting
View Answer

Answer: b
Explanation: The errors that occur in an application need to be located and corrected so that the application runs correctly that is without any error. Such a process of locating and correcting errors is known as debugging.

3. Errors are called as __________ in a program.
a) Bugs
b) Errors
c) Invalid data
d) Exceptions
View Answer

Answer: a
Explanation: Errors are called bugs in a program. Program bugs typically are caused by two types of errors that is syntax errors or logical errors.
advertisement
advertisement

4. A __________ occurs when you break the rules of the language.
a) Logical errors
b) Syntax errors
c) Exceptions
d) Application shut down
View Answer

Answer: b
Explanation: The term syntax refers to the set of rules you must follow when using a programming language. A syntax error occurs when you break one of the language’s rules. Most syntax errors are a result of typing errors that occur when entering the instructions, such as typing Me.cle() instead of Me.close(). The code editor detects most of the syntax errors as you enter the instructions.

5. A __________ occurs while forgetting to enter an instruction, or entering the instruction in wrong order.
a) Logical errors
b) Syntax errors
c) Exceptions
d) Application shut down
View Answer

Answer: a
Explanation: Logical errors are much more difficult to find because they are not detected by the code editor. A logical error can occur for a variety of reasons such as forgetting to enter an instruction or entering the instruction in wrong order. Some logical errors occur as a result of calculation statements that are correct syntactically but incorrect mathematically.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

6. __________ the documentation refers to putting the documentation in a safe place.
a) Debugging
b) Testing
c) Assembling
d) Printing
View Answer

Answer: c
Explanation: Assembling the documentation refers to putting the documentation and the print out of the application’s interface and code in a safe place, so you can refer to them, if you need to change the application in future. Your planning tools include the TOE chart, a sketch of the interface, and either the flowcharts or the pseudocode.

7. A __________ is a predefined procedure that performs a specific task.
a) Flowchart
b) Pseudocode
c) Function
d) Errors
View Answer

Answer: c
Explanation: A function is a predefined procedure that performs a specific task and returns the value for after completing the task. If a function does not return anything its return type is void. A function can return an integer, a character a string etc.
advertisement

8. The __________ function temporarily converts the string to a number and then returns the number.
a) Val
b) Value
c) Integer
d) Convert
View Answer

Answer: a
Explanation: The val function temporarily converts the string to a number and then returns the number. The number is storedin the computer’s internal memory only when the function is processing. The syntax of the val function is Val(string). The item within the parentheses is called an argument and represents the information that the function needs to perform its task.

9. __________ is used to improve the appearance of numbers in an interface.
a) Format function
b) Appear function
c) Val function
d) Number function
View Answer

Answer: a
Explanation: You can use the format function to improve the appearance of numbers in an interface. The function’s syntax is Format(expression, style). The expression argument specifies the number, date, time, or string, whose appearance you want to format. The style argument can be predefined style. It can also be a string containing special symbols that indicate how you want the expression displayed.
advertisement

10. A suggestion for fixing the error appears in the __________
a) Error correction window
b) Error detection window
c) Error location window
d) Properties window
View Answer

Answer: a
Explanation: A suggestion for fixing the error appears in the error correction window. Move the scrollbar in the error correction window all the way to the right. The window indicates a syntax error such as missing parenthesis etc.

Sanfoundry Global Education & Learning Series – Visual Basic.

To practice all areas of Visual Basic, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.