Case 4-1
Brian is trying his best to understand the concept of variable scope, so he calls his friend Molly for guidance.
Brian has defined a variable named strNumberOfSongs within the click event handle for a Submit button, and he has been frustrated in his efforts to refer to this variable in the click event handler for a Clear button. What does Molly tell him is going on?
A. The variable strNumberOfSongs has no scope.
B. The variable strNumberOfSongs is a local variable.
C. The variable strNumberOfSongs was not declared correctly.
D. The variable strNumberOfSongs is a global variable.
Answer: B
You might also like to view...
The statement btnButton.Focus()
(A) has no effect. (B) moves the focus to the button btnButton. (C) has the same effect as clicking on the button btnButton. (D) is invalid in Visual Basic.
Which of the following operators may be used to assign one object to another?
a. = b. ``` == ``` c. ``` <> ``` d. ``` @ ``` e. None of these
Which of the following is a correct statement about UML class diagrams?
a. The second part of the class diagram contains only private members. b. The second part of the diagram contains data members c. The third part of the class diagram contains only public members. d. The top part of the class diagram contains the class name (or tag). e. The third part of the diagram contains member functions.
Which of the following is a computer program that seems to perform one function while actually doing something else?
A. spyware B. virus C. Trojan horse D. computer worm