Introduction to Pascal Programming (CSCT2205)

DIPET 1 in Fundamental Computer Science - FCST

Semester: Second Semester

Level: 200

Year: 2018

School/Faculty: HTTTC Option: FCS DEPARTMENT: Computer Science LECTURER(S): ONABID Mathias
Level: Semester: Second (Examination) Credit Value: 2 Academic Year: 2017/2018
COURSE CODE: CSCT4106 COURSE TITLE: Introduction to Pascal Programming
DATE: 12/07/2018 HALL: TIME: 1h
THE UNIVERSITY OF BAMENDA
P.O BOX 39 Bambili
REPUBLIC OF CAMEROON
Peace-Work-Fatherland
1) Give the structure of a Pascal program and list all the steps involved in
programming.
(2 marks)
1)
What do the following mean in Pascal programming language
a)
Identifiers;
b)
Character constant
c)
Rewrite(F);
d)
Pascal character set
(2 marks)
2)
In Pascal programming language, what is the general format for the following?
a)
The FOR. statement
b)
Array declaration
c)
The REPEAT Statement
(2marks)
3)
Write a Pascal program to read two square tables A and B of integers into the
computer and calculate the sum of the corresponding elements using the formula
C[i, j] = A[i, j] + B[i, j]. Appropriate dimensions and declarations should be given
to the tables. (The following procedures should be use: (1) Procedure READINPUT,
for reading data from the tables, (2) Procedure COMPUTESUM, to calculate the
Sums of the corresponding elements, (3) Procedure WRITEOUTPUT to print the
resulting table).
(5 marks)
4)
Write a Pascal program which reads a real value X from the keyboard and
computes its image by the function
F(X) =
  
  
the program should stop if the value X = 0 is keyed.
(4 marks)
GOOD LUCK!!!
www.schoolfaqs.net