### Past Question Computer Laboratory 2010/2011

Past Question Computer Laboratory 2010/2011

UNIVERSITY OF CALABAR
DEPARTMENT OF MATHS/STATISTICS AND COMPUTER SCIENCE
FIRST SEMESTER EXAMINATION 2010/2011

COURSE: CSC 1181 – COMPUTER SCIENCE LABORATORY 1A TIME: 1 Hour

Write your NAME, REG NUMBER, JAMB NUMBER AND COURSE ID Clearly on your Answer Booklet. Do not write anything on your question paper except your name and registration number.

SECTION A

1. (a) Write short notes on the following terms in BASIC:
I) Constants II) Variables III)Keywords. Give 2 examples of each.

(b) State 3 rules for the formation of BASIC statements and expressions.

(c) How would you express the given algebraic term in BASIC? √(3a2-4c) * 35

2. (a) Differentiate between Numeric data and String data and give 2 examples of each.

(b) Write a program to compute and print out the sum and average of the ages of any given number of students, say n.(Hint: Let your n be = 7)

(c) State 2 features of READ – DATA statement. Why would you use INPUT statements in your BASIC program instead of Read – DATA statements?

3. (a) I) State 2 features of a Subroutine.
II) How are Subroutines similar to functions?

(b) Write a GW-BASIC program to define a function X to compute X = ( Y4 + Y3 – 2Y2 + 2/Y) . Use the FOR-TO-NEXT construct. Print out values of the function X for values of Y ranging from 10 to 20 with a step size of 2.

(c) What is an array? What is the use of the DIM statement in an array? Use a clear example to show the DIM statement is written.

SECTION B

2. Key in and debug the program you wrote in either question 2(b) or 3(b) in section A.
Some examples of filenames are 1050160 for Matric No. 10/50160; 4567AA for a Jamb No 21234567AA; P0900235 for Pre-degree No. PDS-1/09/00235, and K800927 for pre-degree No. 2k8/000927.

Past Questions On Introduction To Basic Programming 2011/2012
Past Questions On Introduction To Computer Science CSC1101 2011/2012
BASIC Program For Sum of Numbers Using IF Then Statement
Pascal Arithmetic Program Using IF THEN statement
Pascal Program to Create and Save Records in a Textfile
Pascal program To Calculate Area of a Triangle
Pascal Program of Matrix Multiplication
Pascal Program to Read in Even Numbers Into An Array

URL Of Post: