0% found this document useful (0 votes)
5 views

spc 2101 introduction to computer programming concepts Year I Semester II

The document outlines the structure and content of the University Examination for the Bachelor of Science in Actuarial Science, specifically for the course SPC 2101: Introduction to Computer Programming Concepts. It includes various programming-related questions covering topics such as data types, algorithms, C programming, error types, and program development stages. Students are instructed to answer one compulsory question and any two additional questions within a specified time frame.

Uploaded by

floydannold
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

spc 2101 introduction to computer programming concepts Year I Semester II

The document outlines the structure and content of the University Examination for the Bachelor of Science in Actuarial Science, specifically for the course SPC 2101: Introduction to Computer Programming Concepts. It includes various programming-related questions covering topics such as data types, algorithms, C programming, error types, and program development stages. Students are instructed to answer one compulsory question and any two additional questions within a specified time frame.

Uploaded by

floydannold
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

UNIVERSITY EXAMINATION 2023/2024

YEAR I SEMESTER II EXAMINATION FOR THE DEGREE OF BACHELOR OF


SCIENCE IN ACTUARIAL SCIENCE
spc 2101: introduction to computer programming concepts

Date: Thursday, 2nd May 2024 Time: 1.30pm – 3.30pm


Instructions
Answer Question ONE (compulsory) and Any Other Two.
Question One
a) Define the term programming. (2 Marks)
b) Outline any four data types used in C programming. (4 Marks)
c) Write an algorithm to calculate the volume of a cylinder. (4 Marks)
d) Distinguish between a complier and an interpreter. (4 Marks)
e) Write a program to calculate sum of even numbers between 1 and 20. The
program should be implemented using for loop. (5 Marks)
f) Using examples, describe three types of errors a programmer can encounter
while coding. (3 Marks)
g) Write a C function to calculate average of two numbers. (5 Marks)
h) Using examples, describe three naming conventions of variables in C
programming. (3 Marks)

Question Two
a) Write a C program to calculate product of two numbers. (5 Marks)
b) Distinguish between a while loop and do…while loop. (2 Marks)
c) Using examples, demonstrate how logical operators can be applied during
programming. (6 Marks)
d) Write a C program to convert degrees centigrade to Fahrenheit. Given the formula:
F=(Celsius*5/9) +32. (7 Marks)

Page 1 of 2
Question Three
a) Write a C program to calculate simple interest. Given: I=
Principle*Rate*Time/100 (7 Marks)
b) Draw a program flowchart to compare three numbers and display the largest.
(7 Marks)
c) Describe the stages of program development. (6 Marks)

Question Four
a) Write a C program to find the area and circumference of a circle for radius
greater or equal to 10. The program should be implemented using while structure.
(7 Marks)
b) Explain two advantages of using a high level language to develop programs.
(4 Marks)
c) Write a C program to calculate gross pay, given that allowances are 15% of the
basic pay. Hint Grosspay=basic+allowances. (7 Marks)
d) Describe the term Pseudocode as used in programming. (2 Marks)

Question Five
a) Write a C program to compare three integers and display the largest. The
program should be implemented using If structure. (7 Marks)
b) Describe four characteristics of a good program. (4 Marks)
c) Write a C program to calculate factorial of number N. (7 Marks)
d) State two examples of syntax errors in C programming. (2 Marks)

Page 2 of 2

You might also like