Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
41 views
14 pages
2015 Nov
kneck 2021
Uploaded by
June Aluoch
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
Download
Save
Save 2015 Nov For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
0 ratings
0% found this document useful (0 votes)
41 views
14 pages
2015 Nov
kneck 2021
Uploaded by
June Aluoch
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
Carousel Previous
Carousel Next
Download
Save
Save 2015 Nov For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
Download
Save 2015 Nov For Later
You are on page 1
/ 14
Search
Fullscreen
easytvet.com Name: ee Index No.: at 2920/103 Candidate's Signatu STRUCTURED PROGRAMMING November 2015, Date: _ ‘Time: 3 hours ‘THE KENYA NATIONAL EXAMINATIONS COUNCIL DIPLOMA IN FORMATION COMMUNICATION TECHNOLOGY MODULEL STRUCTURED PROGRAMMING, 3 hours INSTRUCTIONS TO CANDIDATES Write your name and index number in the spaces provided above. Sign and write the date of examination in the spaces provided above. Answer any FIVE of the EIGHT questions in this paper in the spaces provided after each question Candidates should answer the questions in English. For Examiner's Use Onty i - . “TForal uestion | 1 | Question 2 3 4 5 6 7 8 : Score Candidate's Score | This paper consists of 16 printed pages. Candidates should cheek the question paper to ascertain that all the pages are printed as indicated and that no questions are missing. G2015 The Kenya National Examinations Council ‘Turn overeasytvet.com 1. (@__Deseribe compitation as used in programming. (2 marks) (b) Differentiate between iteration and recursion as used in programming. (4 marks) (©) Peter, a student in a college, was presented with the following ten numeric values: 56, 49, 70, 83, 23, 45, 67, 76, 55 and 37. He was asked to create a data structure that would allow him to have access to each value directly. (i) Tdentify the most appropriate data structure that he would create. (1 mark) (ii)—‘Using the data structure in (i), write a C program that would display the data. (5 marks) 2920103 2 November 2015easytvet.com @ — Gi) Describe two items that could be added to a user manual in order to assist in the access of details and information. (4 marks) Gi) Explain two importance of documenting all the stages during program development. {4 marks) 2. (a) Write operators order of precedence fot evaluating mathematical expressions as used in Pascal programming. (G marks) (&) @__David wrote a program with the seven days of a week declared as enumerated type in Pascal programming. Write two statements that would be used to generate a message “IT’S A WEEKDAY” if the day is not Sunday or Saturday in the program, 4 marks) 2920/03 a ‘Turn over November 2015easytvet.com (i) Differentiate between PRED and SUCC predefined functions as applied in Pascal programming. (4 marks) (©) Write aC program that could print all numbers that are divisible by 9 from I to 99. Use or loop. (5 marks) (@) A student was given a computer program code to study. Outline four characteristics that he may use to ascertain that the program is written using structured prograraming language. (4 marks) 2920/03 4 November 2015easytvet.com 3, (@)_State four chatacters that are used for data conversion specification in C program input and output functions. (2 marks) (b) Explain two uses of a RESET function as used in Pascal programming language, (4 marks) (©) An ICT company iatends to develop a new program. The team leader is faced with a challenge over which programming language to use, Explain three factors that the leader should consider when making a decision. (6 marks) 2920/103 5 Turn over November 2015easytvet.com {@)__ Figure | shows a decision tree that was used by a programmer in a company to eampute the discount offered to customers. Use it to answer the question that follows. Customer Category A | —¥ fro Bisoount] Discount 15% Customer Category B > Figure | Woite a Pascat program that prompts 2 user to enter the amount spent by the customer. ‘The program then computes and displays the discount offered using the logie depicted in Figure 1. (8 marks) 2920/03 6 Navember 2015easytvet.com 4. @ Write the output of each of the following logical operators when executed using C programming language. @ false (mark) (ii) true && false (1 mark) (iti) true iffalse (1 mark) (©) Given that a=10, b=5 and c=2 determine the values of x in each of the following statements as used in Pascal programming. Show your working: (i) x=2*a mod (b-3ysqri(c#2) (2 marks Gi) x=2%e + sqr(at te (2 marks) (c) ‘Tom would like to use random file in his program: @ Outline three advantages of this file; (GB marks) 2920/103, 7 ‘Turn over November 2015easytvet.com (ii) Explain two limitations of this approach to file organization. (4 marks) (@) Jane, a programmer in a hospital was tasked to develop a program using Pascal programming Janguage. The following data items are considered as input: Patient name, patient age, gender F/M and amount paid. (i) Identify the most appropriate data structure for this data. Justify your answer. (2: marks) (ii) Write seginent codes in Pascal programming language to read data in the structure identified in (i), (4 marks) 2920/103 8 November 2015easytvet.com 5. (a) __Explain the function of default statement ina C programming language. (2 marks) (©) With the aid of a flowchart, describe the REPEAT. ..UNTIL loop as used in Pascal programming, (4 marks) (© (i) _—_ Outline four characteristics of assembly programming language. (4 marks) (ii) Explain three reasons for developing a computer program, (6 marks) 2920103” 9 ‘Turn over November 2015easytvet.com {) | The following is a program written by a student using C programming language. The program could not run due to errors. 4include (stadio.A> void main() { float i,j; printf (“input two integers’); fscanf (“td %£",6i,5)7 7 Printf("\n addition=8d subtraction=$d\n” itj, i-d)s 3 Identify eight errors in the program. (4 marks) 6. (a) Outline two similarities between a procedure and a function as used in programming. (2 marks) (b) Explain three typical errors that are likely to occur during fite VO operations in a program, (6 marks) 2920/103° 0 November 2015easytvet.com (©) _ Differentiate benween merge sort and quick soré techniques as used in programming. (4 marks) (2) @_ The following are names of students in a programming class: Leonard, Bancy, Faith, Olive, Quinter, Alice, Patrick, Grace, Helen and Mercy. Represent them in a binary tree, (5 mark) (ii) State the result generated when the tree is traversed using the post order strategy: (3 marks) 2920/103 u ‘Turn over November 2015easytvet.com 7. (a) Patrick, a programmer, developed a program for his client. Outline four ways that he could make the program easy to read and understandable. (4 marks) (>) Maria decided to use a compiler rather than an interpreter during program translation. Outline four reasons that could have ted her to make this decision. (4 marks) (©) Astudent is to develop a program that would prompt a user to enter two integers. The program should then compute the difference between the two integers. The program
You might also like
Cdacc Exam Comp Program
PDF
100% (1)
Cdacc Exam Comp Program
7 pages
EAR 105 Computer Programming I Main Exam
PDF
No ratings yet
EAR 105 Computer Programming I Main Exam
2 pages
CSEC IT Notes - Term 1 Week 9 - Problem Solving and Programming Lecture 2
PDF
No ratings yet
CSEC IT Notes - Term 1 Week 9 - Problem Solving and Programming Lecture 2
47 pages
Pascal Programming
PDF
No ratings yet
Pascal Programming
31 pages
PASCAL Plus Data Structures, Algorithms, and Advanced Programming PDF
PDF
50% (2)
PASCAL Plus Data Structures, Algorithms, and Advanced Programming PDF
657 pages
Gujarat Technological University: Semester: 1
PDF
No ratings yet
Gujarat Technological University: Semester: 1
12 pages
Programming in C Upto Spring 2019
PDF
No ratings yet
Programming in C Upto Spring 2019
16 pages
Paperrrrrrr
PDF
No ratings yet
Paperrrrrrr
2 pages
INTRO TO PROGRAMMING (BBIT 121-CISY 110-DCIS 110-DBIT 121-BSIS 113-MISC 431) 1st Trimester 2016
PDF
No ratings yet
INTRO TO PROGRAMMING (BBIT 121-CISY 110-DCIS 110-DBIT 121-BSIS 113-MISC 431) 1st Trimester 2016
4 pages
Bceq I I PDF
PDF
No ratings yet
Bceq I I PDF
171 pages
Engineering Questions
PDF
No ratings yet
Engineering Questions
162 pages
Sma 191 - Carolyne Mboya-1
PDF
No ratings yet
Sma 191 - Carolyne Mboya-1
5 pages
Computer Programming
PDF
No ratings yet
Computer Programming
21 pages
July 2020 SP Past Paper
PDF
No ratings yet
July 2020 SP Past Paper
4 pages
2015 Nov
PDF
No ratings yet
2015 Nov
19 pages
210CT - QP (F)
PDF
No ratings yet
210CT - QP (F)
8 pages
Pba Model Paper Hssc-II 2nd
PDF
No ratings yet
Pba Model Paper Hssc-II 2nd
3 pages
2016 July
PDF
No ratings yet
2016 July
6 pages
10th Computer Science Pre Board
PDF
No ratings yet
10th Computer Science Pre Board
3 pages
Course Outline Dec2012 Dee Dis16
PDF
No ratings yet
Course Outline Dec2012 Dee Dis16
4 pages
Civil - I I BEX BCT and BCE All PDF
PDF
No ratings yet
Civil - I I BEX BCT and BCE All PDF
162 pages
DIT 0202 Intro To Programming and Algorithms JAN April 2021 MAIN EXAM
PDF
No ratings yet
DIT 0202 Intro To Programming and Algorithms JAN April 2021 MAIN EXAM
2 pages
Question
PDF
No ratings yet
Question
18 pages
Bca 2 Sem C Note 2023-24
PDF
No ratings yet
Bca 2 Sem C Note 2023-24
66 pages
CS Year 10 Practical June 2022
PDF
No ratings yet
CS Year 10 Practical June 2022
11 pages
2.1 Algo Past Papers Workbook by Inqilab Patel
PDF
No ratings yet
2.1 Algo Past Papers Workbook by Inqilab Patel
53 pages
Attempt Question 1 (Compulsory - 30 Marks) and Any Other TWO Questions (15 Marks Each)
PDF
0% (1)
Attempt Question 1 (Compulsory - 30 Marks) and Any Other TWO Questions (15 Marks Each)
3 pages
STW210CT Programming Algorithm and Data Structures: Faculty of Engineering, Environment and Computing
PDF
No ratings yet
STW210CT Programming Algorithm and Data Structures: Faculty of Engineering, Environment and Computing
4 pages
Computer Programming
PDF
No ratings yet
Computer Programming
36 pages
CS 110-Pascal Programming Syllabus
PDF
100% (1)
CS 110-Pascal Programming Syllabus
2 pages
CCS 121 Introduction To Programming-Outline
PDF
No ratings yet
CCS 121 Introduction To Programming-Outline
9 pages
Programming Fundamentals
PDF
No ratings yet
Programming Fundamentals
3 pages
University of Mauritius Faculty of Engineering: Programme
PDF
No ratings yet
University of Mauritius Faculty of Engineering: Programme
8 pages
Candidates Are Required To Give Their Answers in Their Own Words As Far As Practicable. The Figures in The Margin Indicate Full Marks
PDF
No ratings yet
Candidates Are Required To Give Their Answers in Their Own Words As Far As Practicable. The Figures in The Margin Indicate Full Marks
2 pages
CS Year 10 Practical June 2023
PDF
No ratings yet
CS Year 10 Practical June 2023
13 pages
Structured Prog Ict Mod 1
PDF
No ratings yet
Structured Prog Ict Mod 1
4 pages
It Os Ict CR 10 6. Develop Computer Program
PDF
No ratings yet
It Os Ict CR 10 6. Develop Computer Program
3 pages
Elon Musk: Biography of A Billionaire Visionary
PDF
No ratings yet
Elon Musk: Biography of A Billionaire Visionary
10 pages
Attempt Question 1 (Compulsory - 30 Marks) and Any Other TWO Questions (15 Marks Each)
PDF
No ratings yet
Attempt Question 1 (Compulsory - 30 Marks) and Any Other TWO Questions (15 Marks Each)
4 pages
21cs15it Python
PDF
No ratings yet
21cs15it Python
135 pages
("!I9Cl. - Qggsgls:P11Glggltqlg$Ail: Examination Control Division
PDF
No ratings yet
("!I9Cl. - Qggsgls:P11Glggltqlg$Ail: Examination Control Division
30 pages
Final Exam 2018
PDF
No ratings yet
Final Exam 2018
5 pages
Structured Program Exams
PDF
No ratings yet
Structured Program Exams
3 pages
Structured Programing Module20001
PDF
No ratings yet
Structured Programing Module20001
4 pages
The Bcs Higher Education Qualifications BCS Level 4 Certificate in IT
PDF
No ratings yet
The Bcs Higher Education Qualifications BCS Level 4 Certificate in IT
5 pages
Course Module-C Lab
PDF
No ratings yet
Course Module-C Lab
7 pages
Heq Apr24 Cert Software Development
PDF
No ratings yet
Heq Apr24 Cert Software Development
4 pages
Allama Iqbal Open University, Islamabad (Department of Computer Science) Warning
PDF
No ratings yet
Allama Iqbal Open University, Islamabad (Department of Computer Science) Warning
4 pages
RCA Y1 T1 CAT FOP 2023 2024 Marking Guide
PDF
No ratings yet
RCA Y1 T1 CAT FOP 2023 2024 Marking Guide
9 pages
Programming Questions For Form 5
PDF
No ratings yet
Programming Questions For Form 5
3 pages
Paper 2
PDF
No ratings yet
Paper 2
6 pages
Information Technology Problem Solving and Programming 45 Minutes / / Answer All Questions
PDF
No ratings yet
Information Technology Problem Solving and Programming 45 Minutes / / Answer All Questions
6 pages
The Bcs Professional Examination Certificate: The British Computer Society
PDF
No ratings yet
The Bcs Professional Examination Certificate: The British Computer Society
4 pages
GGGDJ
PDF
No ratings yet
GGGDJ
4 pages
C Progrm SCDL
PDF
No ratings yet
C Progrm SCDL
3 pages
Eeb315 Final Exam 2016 PDF
PDF
No ratings yet
Eeb315 Final Exam 2016 PDF
6 pages