ComputerScience-II-VB-Optional
ComputerScience-II-VB-Optional
mnemonic Machine
Object-Oriented/ Event-Driven Procedure-oriented.
ii. The variables that does not change the value during execution of program is __________
Numeric String
Constant Alphanumeric
iii. A translator translates the entire high-level language program into machine code is called?
Assembler Compiler
Interpreter Instruction
public private
protected Dimension
Class Group
Project methods
0 (zero) 1 (one)
2 ( two) both 0 (zero) and 1 (one)
vii. When the user clicks a button, _________ is triggered.
an event a method
a setting a property
ix. If an option button is not selected, its value property is set to:
0 ( zero) 1 ( one)
True False
xii. The tools in the toolbox allow you to add objects to a form called?
Attributes Command
Code Controls
xv. When you give the same name more than one control, you create a :
xvi. The method used to remove items from the list box is called?
RemoveItem DeleteItem
EraseItem FinishItem
xvii. A standard structure for storing data in array X of VB format programming language?
Salary = 34000 Salary ( 0 ) = 34000
Salary [0] = 34000 Salary{0} = 34000
xviii. Visual Basic is a tool that allows you to develop application in __________
Val(number) Val(string)
Val($560) Val(1234)
xx. Which of the following is a valid name in rules for naming variables in VB?
98SalesCur Cur98Sales
Print Form
xxi. When two procedures in different forms need to use the same variable, you declare the
variable as a
Form-level Global
Local Report-level
Fixed Preserve
Dynamic array Multidimensional
xxv. Which control displays current directory with any sub directories and allows the user to change
directly.
FileListBox DriveListBox
DirListBox DirectoryListBox
xxviii. Each individual variable in the list student(0), student(1), student(2) is known as a(n)
subscript dimension
element type
xxx. The_____________is used for finding out about objects, properties and methods.
xxxi. Variables appearing in the header of a Function procedure are called ____________.
xxxii. The arguments appearing in a Call statement must match the parameters in the appropriate
Sub or Function header in all but one of the following ways. Which one?
xxxiii. In Visual Basic, a variable name cannot be more than __________ characters.
255 300
355 400
Two_One 2One
Two One Two.One
xxxv. What is the proper syntax when using a message dialog box?
xxxvi. What value will be assigned to the numeric variable x when the following statement is
executed?
x = (2 + 3) * 4
20 14
92 234
SECTION-B (SHORT ANSWER QUESTIONS) (25 Marks)
NOTE:- Attempt Five question from this section( No Answer Should exceed 6-7 lines)
3. Write the few names of properties and methods that are commonly applying to most objects?
4. Write VB code, the output should be „Pakistan Zindabad‟ displayed on the PictureBox and operated by
pressing Command Button?
OR
What are the differences between GotFocus and LostFocus events? Give any one SetFocus example?
5. Differentiate Relational operators and Logical operators of VB? Give their symbols and purpose?
6. Write VB code to generate table of General n number that should be displayed by pressing Command
Button