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


<=Back

<=KNEC Craft Certificate in ICT module 2 structured programming past paper: July 2016

Write a c program that would be used to calculate and output the sum and product of all numbers in the range of 1 to 5. Use for control structure

    Viewed:  549  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. List four computer generation programming languages
2. Outline two advantages of using web scripting programming language in system development
3. Outline a function of each of the following software as used in programming i.Editor ii.Compiler
4. Describe the term dereference operator as used in computer programming
5. Define the term loader as used in programming
6. The following elements are to be stored in data structure. Declare a structure named student with two instances named student 1 and student2 Serial_Number Student_Number Fee_paid
7. Outline four factors to consider when selecting a computer programming language
8. Explain two examples of test data used during programming language
9. Amina would like to write a computer program that will accept two integers. The program also computes and output their product. Draw a flowchart to represent the logic of the program
10. With the aid of a diagram differentiate between circular linked list and linear linked list
11. Describe two tools that could be used in a program design stage, other than flowchart
12. Write a C program that would output 10 integers to a file.
13. Interpret the following program segment. #include<stdio.h> int main() { int i=1; while(i<=10) { printf("My first "); printf("c program \n"); i=i++; } return 0; }
14. Outline two reasons that would justify the use of binary files
15. Explain the function of each of the following operator as used in C programming; i)Assignment ii) Relational.
16. Differentiate between double and float data type as used in C programming language.
17. Write a c program that would be used to calculate and output the sum and product of all numbers in the range of 1 to 5. Use for control structure
18. Explain one way of coping with a new programming language
19. Outline the steps that could be followed to bubble sort the following elements in ascending order. (6 marks) 10, 19, 0, 18, 2, 1
20. Write a c program that accept the base and height of a right angled triangle and also computes and output the area of the triangle.
21. Explain two circumstances under which trees are appropriate in programming
22. Given that a=8, b=6, c=2 compute the value of Z using the following c statement Z=(a%b)*c+b*c+a
23. Write a C program that computes and outputs the product of numbers in the range 1 and 5. Represent the logic of the program using a Flowchart
24. Figure2 represent a ring. Write a program that accepts the radius R and r of the ring. The program should then compute the area of the shaded area through the use of function. The program should then output the area of the ring. Hint Area=#πR^2-πr^2#
25. Write a C programming input statement that would be used to input each of the following data using the computer keyboard; i)34.9 : ii)Computer : iii)90: iv)A0023 :
26. Hannah would like to compute an insertion sort code in a program she was developing. Outline three advantages and three disadvantages of this type of sorting
27. Write a C program to accepts name made up of five letters. The program should also output the letter in reverse order
28. Annette would like to prepare a program user documentation for a developed system. Outline five function of this documentation
29. Sueman would like a program that would accept marks for four student obtain their average and then display it. Represent the logic of the program using a pseudocode
30. Write a C program that would be used to delete an element from a queue


About Us

Contact us

Terms of use | Privacy policy

Follow Us:               

All Rights Reserved © 2024; pscustudies.com