SPI 2101 Introduction To Computer Programming Year I II Semester I
SPI 2101 Introduction To Computer Programming Year I II Semester I
Page 1 of 3
g) Describe three translator programs used in programming. (3 Marks)
h) Write a code snippet to declare a two dimensional array called 'Grade' of 3
rows and 3 columns. Initialize the array with the following values. 56, 98, 53,
74, 62, 81, 59, 61, 78. (4 Marks)
i) Study the variables below and indicate whether they are valid or invalid. Justify
your answer. (3 Marks)
1. @totalweight
2. Net Weight
3. Weekl
Question Two
a) Using for loop, write a C program that can generate the output below.
(7 Marks)
b) Draw a flowchart that can compare weights of three students and display the
heaviest. (7 Marks)
c) Using examples explain any three data types used in C programming. (6 Marks)
Question Three
a) Write a C program to generate the multiplication table below as output. (7 Marks)
Page 2 of 3
Question Four
a) Write a C program that can display the grades on the table below based on
the inputted marks. The program should be implemented using switch statement.
(7 Marks)
Page 3 of 3