Professional Documents
Culture Documents
ICT Dcs229
ICT Dcs229
DEPARTMENT:.........IT...........................................................................................................................
SUBJECT:.........vb................... CODE:..................................................................
NO. OF COPIES:.......................................................20........................................................................
INSTRUCTIONS TO CANDIDATES.
81-100 “ A”
76-80 “A-”
68-75 “B+”
58-67 “B”
48-57 “C+”
38-47 “C”
30-37 “C-”
3. (a) Explain the term concatenation as used in visual basic program. (2 marks)
(b) Explain two symbols used for concatenation in visual basic program giving an example in
each case. (4 marks)
(c) With the use of a Function. Write a visual basic program that will calculate the area of a
circle. Attach the code to the command button. (4 marks)
4. Name the three types of logical operators that are used in visual basic. In each type give three
examples. (10 marks)
5. State whether each of the following variable declaration are valid or invalid giving a reason for
answer. (10 marks)
i. Dim myname as string
ii. Dim answer123 as integer
iii. Dim !number as integer
iv. Dim const num=3.14 as float
(b) Explain circumstance that would necessitate the use of each of the following statements when
declaring variables: (10 marks)
i. Dim;
ii. Option explicit;
iii. Public;
6. (a) Distinguish between caption and name as used in menu editor in visual basic program
(2 marks)
(b) With example; name and explain any four operators that are used in visual basic program
(4 marks)
(c) List and explain any four data type in visual basic program (4 marks)