Get premium membership and access revision papers, questions with answers as well as video lessons.

Procedural Programming 1 Question Paper

Procedural Programming 1 

Course:Bachelor Of Computer Science

Institution: Moi University question papers

Exam Year:2012



FIRST YEAR SECOND SEMESTER EXAMINATION
COM 121:PROCEDURAL PROGRAMMING 1
TIME: 3 HOURS
INSTRUCTION TO CANDIDATES:
ANSWER ALL QUESTIONS IN SECTION A AND ANY THREE IN SECTION B
SECTION A (31 MARKS)
QUESTION ONE
a) I) Define operating system. (2marks)
ii)Differentiate between a general purpose and a specific purpose programming language with two examples each. (4marks)
b) Describe the drawbacks of machine language. (4marks)
c) Diffrentiate between the following
a. Loader and linker. (2marks)
b. Assembler and compiler. (2marks)
c. Testing and debugging (2marks)
QUESTION TWO
a) Explain the following terminologies (1mark each)
i) CASE selection
ii) Looping control structure
iii) Pseudocode
b) Differentiate between a compiler and interpreter(4marks)
c) Explain four advantages of flow charts in program development(2marks)
d) (i) Write a program to find sum and average of any two numbers entered by user.(4marks)
(ii)Write the general format of the IF…THEN…ELSE control structure(2marks)
SECTION B (39 marks)
QUESTION THREE
a) Write a program in C that accepts two numbers and displays the highest and the lowest(5marks)
b) Explain the term object code(2marks)
c) Describe the nested if statement(2marks)
d) Differentiate between the while and do while statements(4marks)
QUESTION FOUR
a) List and explain two types of errors in programming.(2marks)
b) Describe any three examples of high level programming languages and the areas they are used in writing computer programs.(3marks)
c) Explain 3 types of documentation (3marks)
d) Using suitable example, describe structure of select case statement(4marks)
QUESTION FIVE
a) Write a program that can be used to sum all even numbers between 2 and 100. (5marks)
b) Explain the main stages involved in program development(4 marks)
c) Identify the error and correct it in the program below (4marks)
main()
{
int I;
printf(“enter a number”)
scanf””,&i);
if(i<=50)
printf(“\n entered number is <50)
QUESTION SIX
a) Using suitable examples explain any three looping statements(6marks)
b) The following marks are provided as shown below:
1. Marks from 95 and above, one would get grade ‘A’
2. Marks from 80 and above, one would get grade ‘B’
3. Marks from 60 and above, one would get grade ‘C’
4. Marks from 50 and above, one would get grade ‘D’
5. Anyone whose score is less than 50, would get an ‘F’
Expected :
i) Write a program that will allow the user to enter names of the student, marks obtained in 5 subjects (French, Kiswahili, Maths, Geography and Computer). The program should calculate the total and average marks for each student and assign the grading as shown above. (4marks)
ii) Draw a flow chart for the program above (3marks)
QUESTION SEVEN
a) (i) Explain the advantages of using modules in program development(4marks)
(ii) explain briefly the 6 stages of program development (6marks)
b) Describe at least four common data types in C language. (3marks)






More Question Papers


Popular Exams


Mid Term Exams

End Term 1 Exams

End Term 3 Exams

Opener Exams

Full Set Exams



Return to Question Papers