CSC 215 Practice Questions
CSC 215 Practice Questions
On
Visual Basic
What is the correct statement when declaring and assigning the value of 100 to an
Integer variable called numPeople
A. Dim numPeople =
B. Dim numPeople = Int(100)
C. numPeople = 100
D. Dim numPeople As Integer = 100
Which of the following arithmetic operations has the highest level of precedence?
A. + –
B. * /
C. ^ exponentiation
D. ( )
What value will be assigned to the numeric variable x when the following statement
is executed? x = 2 + 3 * 4
A. 20
B. 14
C. 92
D. 234
Option Explicit requires you to declare every variable before its use.
A. True
B. False
________ function returns the intervals between two dates in terms of years,
months or days.
[A] DateDiff( )
[B] DateIn( )
[C] DateFix( )
[D] DiDate( )
______ array size can be changed at run-time.
[A] Fixed
[B] Preserve
[C] Dynamic array
[D] Multidimensional
The window in which the individual documents are displayed is called
____________window.
[A] Main
[B] Child
[C] Parent
[D] Root
_________ is the process of finding and removing errors.
[A] Checking
[B] Compiling
[C] Debugging
[D] Quick watch
_______ loop repeats a group of statements for each item in a collection of
objects or for each element of an array.
[A] While loop
[B] Do Until loop
[C] Do while loop
[D] For each loop
A __________ variable is one that is declared inside a procedure.
[A] global
[B] local
[C] external
[D] None of the above
_______ control executes the timer events at specified intervals of time.
[A] Clock
[B] Frame
[C] Timer
[D] Digital
MDI stands for _________
[A] Multiple Document Interface.
[B] Multiple Design Interface.
[C] Manipulated Document Interface.
[D] Menu Design Interface.
A _______control in visual basic is used to create applications that present
information in rows and columns.
[A] MSGridLine
[B] MSLineGrid
[C] MSGridFlex
[D] MSFlexGrid
__________ cannot be declared in a form or class module.
[A] Static constants
[B] Private constants
[C] Public constants
[D] None of these
__________ do not return a value.
[A] Sub procedure
[B] Function procedure
[C] Property procedures
[D] All of these
The default datatype for VB is ___________
[A] Integer
B] Decimal
[C] Variant
[D] String
_________ is a built in function to return lower bound of an array.
[A] Lbound()
[B] LRbound()
[C] Lowbound()
[D] None of these
The _________ allows direct exit from a For loop, Do loop, Sub procedure, or
Function procedure.
[A] Break
[B] Exit
[C] Exit for
[D] Exit Do
Which of the following arithmetic operations has the highest level of precedence?
A. + –
B. * /
C. ^ exponentiation
D. ( )
What value will be assigned to the numeric variable x when the following
statement is executed? x = 2 + 3 * 4
A. 20
B. 14
C. 92
D. 234
Which of the following is a valid name for a variable?
A. Two_One
B. 2One
C. Two One
D. Two.One
Keywords in Visual Basic are words that
A. should be used when naming variables.
B. are used to name controls, such as TextBox1, Command2, etc.
C. have special meaning and should not be used when naming variables.
D. are used as prefixes for control names (such as txt, btn, lbl, and lst).
Sizing Handles make it very easy to resize virtually any control when developing
applications with Visual Basic. When working in the Form Designer, how are these
sizing handles displayed?
A. A rectangle with 4 arrows, one in each corner, around your control.
B. A 3-D outline around your control.
C. A rectangle with small squares around your control.
D. None of the above.
The Properties window plays an important role in the development of Visual Basic
applications. It is mainly used
A.to change how objects look and feel.
B. when opening programs stored on a hard drive.
C. to allow the developer to graphically design program components.
D. to set program related options like Program Name, Program Location, etc.
When creating a new application in Visual Basic, you are asked to supply a name for
the program. If you do not specify a name, a default name is XXXXX XXXXX is this
default name?
A. Wapplication followed by a number.
B. Application followed by a number. C. WindowsApplication.
D. WindowsApplication followed by a number.
Which of the properties in a control’s list of properties is used to give the control a
meaningful name?
A. Text
B. ContextMenu
C. ControlName
D. Name
Pseudocode is
A. data that have been encoded for security.
B. the incorrect results of a computer program.
C. a program that doesn’t work.
D. the obscure language computer personnel use when speaking.
E. a description of an algorithm similar to a computer language.
n algorithm is defined as:
A. a mathematical formula that solves a problem.
B. a tempo for classical music played in a coda.
C. a logical sequence of steps that solve a problem.
D. a tool that designs computer programs and draws the user interface.
Physics Department