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

Structured Programming0002

The document is an examination paper for a structured programming module by the Kenya National Examinations Council, dated March/April 2023. It consists of two sections, with candidates required to answer all questions in Section A and any four from Section B, covering various topics in C programming. The paper includes questions on source code, data structures, programming paradigms, and practical programming tasks.

Uploaded by

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

Structured Programming0002

The document is an examination paper for a structured programming module by the Kenya National Examinations Council, dated March/April 2023. It consists of two sections, with candidates required to answer all questions in Section A and any four from Section B, covering various topics in C programming. The paper includes questions on source code, data structures, programming paradigms, and practical programming tasks.

Uploaded by

mercywambui451
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 3
1920/203 STRUCTURED PROGRAMMING March/April 2023 Time: 3 hours THE KENYA NATIONAL EXAMINATIONS COUNCIL IN INFORMATIO! ECHNOLOGY CRAFT CERTIFICAT MODULE II STRUCTURED PROGRAMMING 3 hours INSTRUCTIONS TO CANDIDATES: This paper consists of TWO Sections: A and B Answer ALL the questions in section A and any FOUR from section B in the answer booklet provided. Candidate should answer the questions in English. This paper consists of 4 printed pages. Candidates should check the question paper to ascertain that all the pages are printed as indicated and that no questions are missing. © 2023 The Kenya National Examinations Council ‘Turn over SECTION A (40 marks) Answer ALL the questions in this section 1. (a)__ Explain the term source code as used in programming. (2 marks) (b) State two advantages of an assembly programming language. (2 marks) 2. Explain the function of each of the following pre-processor statements in a C programming language library. @ — #include; (b) #define. (4 marks) 3. Judy intends to include an iteration control structure in a program she is writing using C programming language. State four examples of keywords she is likely to use in this control structure. (4 marks) 4. (@)_Explain the funetion of format specifiers in C programming language. (2 marks) (b) State four examples of format specifiers in a C programming language. (2 marks) Differentiate between \¢ escape sequence and \r escape sequence as used in C programming language. (4 marks) 6. Outline four operations that may be performed on a file in a C program (4 marks 7. Describe each of the following types of data structures used in C programming language: (a) array; 4 (b) structures. (4 marks) 8. Sandy has opted to use the selection sort technique to sort information stored in an array data structure. Explain two advantages realised from using this technique. (4 marks) @ r 9. State two differences between a keyword and an identifier as used in C programming language. \ (4 marks) 10. There are several programming paradigms that programmers may opt to use to develop f] software. State four types of such programming paradigms. (4 marks) i . 1920/203 2 March/April 2023 © Me @) ) 6 i ak 5° © . (a) 6) 8 s () NY, 1920/203 March/April 2023 Ye ‘The following is a section of a program written in C programming language. Use it to answer the question that follows: #include int add(int a, int b); int main() { dd (10,20); add(int a,int b) int ¢; c=atb; return Explain the role of each of the following parts in the program: (@ line number 2; (ii) fine number 6; (iii) lines numbered 10 to 14. (6 marks) Outline three rules to consider when naming identifiers in C programming language. (G marks) Joel intends to develop a user manual for a program he has developed. (@ Explain the term user manual. (2 marks) (ii) Outline four types of information that he would include in the user manual. (4 marks) Write a program in C programming language that would accept a number and determine if the entered number is a multiple of 4 or not. The program should then display the results on the screen through the use of an output statement. (6 marks) Differentiate between a local variable and a global variable as used in programming./ (4 marks) Mary intends to use an algorithm during the design of a program, (Explain the term algorithm. (2 marks) (ii) Outline four characteristics of a good algorithm. (4 marks) Write a program in C language that would display the statement KARIBU KENYA on twenty-five different lines. Use a while loop. A (5 marks) ¥ THIS IS THE LAST PRINTED PAGE. wy N 4 : NY ¢

You might also like