Visual Basic Programming Fundamentals
Quiz covering basic programming concepts including loops, error handling, exceptions, and Windows Forms CheckBox controls
Questions
Question 1 Multiple Choice (Single Answer)
The advantage of For...Next loops over Do...Loops is that they are:
- easier to read and maintain.
- less prone to being infinite loops.
- good for working with arrays.
- Both a and b.
- All of the above.
Question 2 Multiple Choice (Single Answer)
Which is not a valid Exit statement?
- Exit Do
- Exit For
- Exit Form
- Exit Select
- Exit Sub
Question 3 Multiple Choice (Single Answer)
A sentinel value:
- is used to prevent infinite loops.
- must be a negative value.
- signals the end of a list of data.
- Both a and b.
- All of the above.
Question 4 Multiple Choice (Single Answer)
Which function should be used to validate that input is not a string before performing arithmetic operations?
- IsArithmetic
- IsNotString
- IsNumeric
- IsString
- IsValue
Question 5 Multiple Choice (Single Answer)
Which is not a type of error programmers look for?
- Logic
- Runtime
- Superficial
- Syntax
- All are errors programmers look for.
Question 6 Multiple Choice (Single Answer)
Which action will raise an exception?
- Dividing by zero.
- Assigning the string "Hi" to an integer variable.
- Accessing an empty CD drive.
- Both a and b.
- All of the above.
Question 7 Multiple Choice (Single Answer)
An Exception is another name for a:
- compile error.
- logic error.
- runtime error.
- superficial error.
- syntax error.
Question 8 Multiple Choice (Single Answer)
What is the most number of states a CheckBox can have?
- 1
- 2
- 3
- 4
Question 9 Multiple Choice (Single Answer)
What is the standard prefix for the name of a CheckBox?
- chb
- chk
- ckb
- ckx
- cbx
Question 10 Multiple Choice (Single Answer)
A CheckBox can also appear as a(n):
- button.
- RadioButton.
- ScrollBar.
- Both a and b.
- All of the above.