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

Structred Programming0001

The document is an examination paper for the Craft Certificate in Information Technology focusing on Structured Programming, issued by the Kenya National Examinations Council. It consists of two sections with a total of 15 questions covering various topics related to C programming, including data structures, operators, constants, and program design. Candidates are instructed to answer all questions in Section A and any four from Section B, with specific marks allocated to each question.

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 views4 pages

Structred Programming0001

The document is an examination paper for the Craft Certificate in Information Technology focusing on Structured Programming, issued by the Kenya National Examinations Council. It consists of two sections with a total of 15 questions covering various topics related to C programming, including data structures, operators, constants, and program design. Candidates are instructed to answer all questions in Section A and any four from Section B, with specific marks allocated to each question.

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/ 4
1920/203 STRUCTURED PROGRAMMING November 2021 ‘Time: 3 hours . THE KENYA NATIONAL EXAMINATIONS COUNCIL CRAFT CERTIFICATE IN INFORMATION TECHNOLOGY MODULE IL STRUCTURED PROGRAMMING 3 hours INSTRUCTIONS TO CANDIDATES, This paper consists of 15 (FIFTEEN) questions in TWO Sections: A and B Answer ALL the questions in section A and any FOUR in section B in the answer booklet provided. Candidate should answer the questions in English o 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. © 2021 The Kenya National Examinations Council ‘Turn over 9. 10. SECTION A (40 Marks) Answer all questions in this section (@) Outline three types of C sokens used in a C program, G marks) {b) Outline the use of each of the following operators in a C program: (relational; i) logical; (2 marks) State three differences between a character and a string constant as used in a C program. (G marks) Outline three disadvantages of a low level programming language. G marks) Joan used linked list data structures in her program. Outline four advantages she is likely to realise from using this data structures, (4 marks) Explain one reason that would make a programmer use of each of the following escape sequence operators in a C program: am Ge (4 marks) ‘The surface area of a cuboid is obtained by using the formula 2/width x length + length x height + height x width). Write a C program that would declare the dimesions and compute the surface area of the cuboid and display on the sereen given that the length =10,width =20 and height = 40. (4 marks) Johnson intends to name identifiers when writing a C program. Outline three rules that he should observe. (3 marks) Explain two ways of defining constants in a € program. (4 marks) Distinguish between a pointer and an iterator as used in C programming, (4 marks) (2) Outline three advantages of using a call by reference method as used in a C programming language. (marks) (b) John a programming student opted to use an objected oriented programming language to write a program. Outline three features of this language that he is likely to use. G marks) © @ 127 @) (b) (©) (d) 1920/203 November 2021 SECTION B (60 marks) Answer any FOUR questions in this section (i) Explain the term sorting as used in C programming data structures. (mark) (ii) State four examples of sorting techniques used in data structures. (2 marks) Figure | shows a binary tree having the nodes A, B, C, D and E, Use it to answer the questions that follow. Figure | Using the figure, state two characteristics of the binary tree. (2 marks) Differentiate between an assembler and a compiler as used in programming. (4 marks) Explain three disadvantages of not following a program development life cycle during the development of software (6 marks) State the format specifies used with a printf statement to display each of the following: (i) avalue of an integer; (i) astring variable; (iii) a hexadecimal value. (G marks) poe Distinguish between top down and batiom up program design approach as used in programming. way = (4 marks) State one reason for performing each of the following program testing when developing a program: (i) seeurity; (ii) functional. (4: marks) Anne would like to include pointers in a program she is writing. Outline four advantages of using pointers. (4 marks) 3 ‘Turn over 0) () @) My @) ) CG) 4; « (b) © 1920/203 ‘The following is a syntax of a structure statement in a C program, Use it to answer the question that follows: Student-firstname State the function of the dot(.) operator in the statement. (2 marks) Explain the function of each of the following declared function prototype statements in aC program: (float area(int int) (ii) int sum(int). (4 marks) A student used expressions in a C program that he developed. Outline three types of expressions that he may have used. G marks) Write a C program that would prompt for 5 numbers one after the other and print the sum of the numbers using an array. (6 marks) Outline three advantages of structures in a C program. (G marks) Jane documented a program she developed using a C programming language. Describe three types of documentations she may have included. (6 marks) Write a C program that would display the following pattern when executed. Use a fi loop statement. it 22 33 44 (6 marks) Distinguish between prinyf() and putchar( function as used in C programming, language (4 marks) Explain the function of each of the following commands in a C program: (curly braces; A Gi) return 0; (iii) #include (6 marks) Write a C program that accepts a string of 10 characters and prints the first and last character of the string. (5 marks) Kein ©) THIS IS THE LAST PRINTED PAGE. a November 2021 + MH —“_Seee

You might also like