0% found this document useful (0 votes)
9 views3 pages

Develop Computer Programs Level 6 Exam With Stems

The document outlines an examination for Level 6 in developing computer programs using C language, divided into two sections: Section A with short answer questions on programming concepts and debugging, and Section B with structured and higher-order questions on program development life cycle, structured programming, and system validation. It includes tasks such as defining programming terms, identifying errors in provided C code, and creating flowcharts and algorithms. The exam emphasizes understanding and applying structured programming techniques and debugging skills.

Uploaded by

josephotieno808
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views3 pages

Develop Computer Programs Level 6 Exam With Stems

The document outlines an examination for Level 6 in developing computer programs using C language, divided into two sections: Section A with short answer questions on programming concepts and debugging, and Section B with structured and higher-order questions on program development life cycle, structured programming, and system validation. It includes tasks such as defining programming terms, identifying errors in provided C code, and creating flowcharts and algorithms. The exam emphasizes understanding and applying structured programming techniques and debugging skills.

Uploaded by

josephotieno808
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

DEVELOP COMPUTER PROGRAMS – LEVEL 6

Time: 2 Hours

Instructions:
1. Answer ALL questions in Section A
2. Answer ANY THREE questions in Section B
3. Write all programs using C programming language

SECTION A: SHORT ANSWER & APPLICATION QUESTIONS (40 MARKS)


Question 1 (Stem)
During the introduction of programming to new trainees, a trainer emphasizes
understanding basic programming terms.

Required:
Define the following terms:
a) Computer program
b) Algorithm
c) Variable
d) Compiler
(8 marks)

Question 2 (Stem)
A software developer is required to use structured programming techniques to improve
program readability and maintenance.

Required:
Explain the following concepts as used in structured programming:
a) Sequence control structure
b) Selection control structure
c) Iteration control structure
d) Modular programming
(8 marks)

Question 3 (Stem – C Program Debugging)


A trainee attempted to write a C program to calculate the sum of two numbers, but the
program fails to compile correctly.

Program:
#include <stdio.h>
int main()
{
int a, b, sum
printf("Enter two numbers:");
scanf("%d %d", a, b);
sum = a + b
printf("Sum is %d", sum);
return 0;
}

Required:
a) Identify FOUR errors in the program. (8 marks)
b) Rewrite the corrected program. (4 marks)

Question 4 (Stem – C Program Debugging)


A programmer was required to write a loop that displays numbers from 1 to 5. The program
below does not work as intended.

Program:
#include <stdio.h>
int main()
{
int i;
for(i = 1; i <= 5; i--)
{
printf("%d\n", i);
}
return 0;
}

Required:
a) Identify THREE logical errors in the program. (6 marks)
b) Correct the program so that it works as intended. (6 marks)

SECTION B: STRUCTURED & HIGHER-ORDER QUESTIONS (80 MARKS)


Question 5 (Stem – Analyzing)
A software project failed due to poor planning and lack of proper development procedures.

Required:
a) Analyze the stages of the Program Development Life Cycle (PDLC) and explain how each
stage contributes to successful program development. (10 marks)
b) Differentiate between syntax errors, logical errors, and runtime errors using relevant
examples. (10 marks)

Question 6 (Stem – Evaluating)


An organization is developing a large-scale system involving multiple programmers
working as a team.

Required:
a) Evaluate the importance of structured programming in the development of large
software systems. (10 marks)
b) Assess the role of testing and debugging tools in improving program reliability and
maintainability. (10 marks)

Question 7 (Stem – Creating)


A banking system requires validation of numerical inputs entered by users.

Required:
a) Design a flowchart that determines whether a given number is positive, negative, or zero.
(8 marks)
b) Develop a C program that accepts a number and displays whether it is positive, negative,
or zero. (12 marks)

Question 8 (Stem – Creating / Analyzing) – OPTIONAL


A teacher wants to calculate the average score of five students using a computer program.

Required:
a) Design an algorithm to calculate the average of five numbers entered by a user. (8 marks)
b) Construct a C program that implements the algorithm using a loop and appropriate data
types. (12 marks)

You might also like