NEW
Font size
Worksheets[CSC301] Quick Exercise 4-1
Total questions: 15
Worksheet time: 15mins
Which type of statement causes a procedure to execute?
Step Into
Access specifier
Procedure call
Procedure declaration
What happens when a procedure finishes executing?
The application branches back to the procedure call and resumes executing at the next line
The application enters break mode
The application terminates
The application waits for the user to trigger the next event
In what way is a function different from a procedure?
A function must be executed in response to an event
There is no difference
A function returns a value and a procedure does not
A procedure returns a value and a function does not
What is an argument?
A value passed to a procedure or function when it is called
A local variable that retains its value between procedure calls
A variable that a parameter is passed into
A reason not to create a procedure or function
What keyword is used in a parameter declaration to specify that the argument is passed by value?
ByVal
Val
AsValue
Value
When an argument is passed to a procedure this way, the procedure has access to the original argument and may make changes to it.
By default
By address
By value
By reference
If an application’s menu system has a Cut command on the Edit menu, what should the MenuItem control for the command be named?
mnuCut
mnuEditCut
mnuEdit
mnuCutEdit
Which of the following statements disables the mnuFilePrint object?
Disable mnuFilePrint
mnuFilePrint.Enabled = False
mnuFilePrint.Disabled = True
mnuFilePrint.Available = False
Which of the following instructs a function to return the value stored in the dblBonus variable?
Send dblBonus
SendBack dblBonus
Return dblBonus
Return ByVal dblBonus
If a statement passes a variable’s address, the variable is said to be passed
by content
by address
by reference
by value
Which of the following statements invokes the GetDiscount function, passing it the contents of two Decimal variables named decSales and decRate? The statement should assign the function’s return value to the decDiscount variable.
decDiscount = GetDiscount(ByVal decSales, ByVal decRate)
decDiscount = GetDiscount(decSales, decRate)
GetDiscount(decSales, decRate, decDiscount)
None of the above.
The horizontal line in a menu is called
an item separator
a separator bar
a menu bar
None of the above
The underlined letter in a menu element’s caption is called
an access key
a menu key
a shortcut key
None of the above
Which of the following is false?
You should assign shortcut keys to commonly used menu titles.
Menu titles should be one word only.
Each menu title should have a unique access key.
Menu items should be entered using book title capitalization.
Which of the following terms means to divide an application’s code into small, manageable procedures?
Bind
Break
Modularize
Modularize
