Click to follow our Afritutor YouTube Channel, subscribe and click notifications and get updates on new learning videos


<=Back

<=KNEC diploma in ICT module 1 structured programming past paper: July 2022

Outline two advantages of binary search algorithm

    Viewed:  245  times
For Better experience and learning,for video answers, after video ends playing, click next question in the questions list!!!

  Share in:
        

Question Answer:





Questions List:

1. Outline four advantages of high-level programming languages
2. Explain the term bug as used in programming
3. Differentiate between function call and function definition as used in C language
4. The following was executed in a C language program. (7%2) *3+4 <5 Showing the working, state the Boolean output generated
5. A student is graded based on exam performance and class attendance. When the performance is above 50% and class attendance greater than 75%, the student is awarded "Pass". When the class attendance is less than 75%, the student retakes the course. Otherwise, the student sits for a supplementary exam. Draw a program flowchart to represent this logic
6. State two symbols for comments in a Pascal program
7. Explain the purpose of each of the following statements in a program. (1) Goto (II) Continue
8. Martin used global variables in a program. Explain two errors he is likely to encounter when executing the program
9. Write a program in Pascal language that prompts a user to enter an amount in shillings then computes and displays the number of data bundles purchased. Take Kshs 1 = 5MB
10. Explain the term modular design as used in programming
11. Explain two importance of pointers in programming
12. Differentiate between sequence and iteration control structures
13. A footballer is offered a position at an international club based on two of the following; academic qualification, experience of 5 years or more and discipline. Draw a limited entry decision table to represent this information
14. Table 1 shows outcomes of a competency based test. Use it to answer the question that follows. Write a program in Pascal language that prompts a user to enter the outcome. The program then displays the corresponding meaning. Use case statement
15. Outline four disadvantages of monolithic programming approach
16. Describe two documentations used in programming
17. With aid of a diagram, describe a doubly linked list
18. The following Pascal program has errors. Use it to answer the question that follows. Rewrite the program correctly.
19. Write a program in Pascal language that accepts 5 numbers and stores them in an array. The program then displays the numbers in reverse order.
20. State six stages in the program development process
21. Explain each of the following terms as used in programming. (1) Dry run; (II)Compilation
22. Distinguish between fixed and dynamic data structures
23. State an inbuilt Pascal function that could perform each of the following: (i)join two strings; (1 mark) (ii)convert a character to its ASCII code; (1 mark) (iii)count the number of characters in a string; (1 mark) (iv) display the previous number in an enumerated list. (1 mark)
24. A student would like to store the following details in a C language program. Name, Date of Birth, height, weight, Sub county. Declare the most appropriate data structure that he could use
25. State four items that are included in a program documentation to ease access to information
26. Differentiate between event driven and object oriented programming approaches
27. The following are elements in an array: 69, 80, 78, 42, 30, 56, 48, 62 Showing all the passes, sort the array in ascending order using selection technique
28. Write a program in C language that prompts a user to enter two numbers. The program then uses a compound operator to determine the larger of the two numbers and displays the result
29. Outline four escape sequence characters used in C programming language
30. Explain the term portability as used in programming
31. State a file operation used to perform each of the following in Pascal language. (i)Detect end of a file. (1 mark) (ii)Open a file for reading. (1 mark) (iii)Attach a file handle to a binary file
32. The following are names of students in a class: Levi, Jane, Bethel, David, Arthur, Zoe and Martin. (i) Draw a binary search tree to store the names. (ii)Traverse the tree in (i) using pre-order strategy
33. Write a program in C language that accepts a character value and displays its memory address.
34. Outline two advantages of binary search algorithm
35. Explain two reasons for passing parameters by reference in a subprogram
36. Differentiate between serial and sequential file organization methods
37. Write a program in C language that prompts a user to enter a number. The program then computes and displays the square root of the number
38. Write a program in Pascal language that prompts a user to enter weight in kilograms and height in meters. The program then computes Body Mass Index (BMI) using a function. The program then displays underweight when the BMI is less than 18, Normal when the BMI range is between 18 and 25, otherwise overweight. (Hint: BMI-Weight/(Height)^2)
39. A student wrote the following C language program. Use it to answer the question that follows. Interpret the program line by line


About Us

Contact us

Terms of use | Privacy policy

Follow Us:               

All Rights Reserved © 2024; pscustudies.com