KNEC Craft Certificate in ICT module 2 structured programming past paper: July 2017 Answers

Solved and verified

Course Name:  Information and Communication Technology
Also Done By:
Diploma in ICT module 1
Course Level:  Craft Certificate
Sub Level:       Module II
Course Unit:   Structured Programming
Exam body:    KNEC

Share with Friends:
        
Go Back



1. The following program code written in one of the programming languages. (4 marks) LDA 34 ADD #1 STO 34 a.Identify the generation of the programming language. b.State three benefits of using the generation language. ()

2. Distinguish between a program and a programming language as used in software development ()

3. Given that the value of a variable X is 90. State the output when each of the following statement is executed in C programming. (4 marks) a.X+=25; b.X*=21; c.X-=42; d.X%=3; ()

4. State the difference between putchar(a) and putchar a[0] statements as used in C programming language ()

5. With aid of a syntax statement, describe three parts of a for loop as used in c Programming language ()

6. Describe the term white space characters as used in C programming ()

7. State two examples of whitespace characters as used in C programming ()

8. Distinguish between call by value and call by reference as used in programming ()

9. Outline three places in a C program where a variable can be declared ()

10. Outline the function of each of the following statement in C program: i.int mult(intx,inty) ii.scanf(ā€œ%d%dā€ &a&a) iii.scanf(ā€œ%sā€,t(i)) ()

11. State the difference between r+ and w+ file commands as used in C programming ()

12. Describe two parts of a pointer as used in programming ()

13. Outline four operations that can be performed on a linked list ()

14. Andrew would like to develop a system using one of the programming languages. Explain three factors that he should consider when selecting appropriate language ()

15. Write a C program code that would prompt a user to enter 10 numbers. The program should then sum up the numbers and display the result. Use a while loop ()

16. Explain each of the following terms as used in programming i)Interpreter ii) editor ()

17. Explain two factors to consider when declaring formal parameters in C programming ()

18. Write a C program code that would prompt a user to enter two numbers. Then use a function to compute the sum of the two numbers and display the results ()

19. Outline the function of each of the following printf() format specifies used in C programming i)%c ii)%e iii)%f ()

20. Describe the term technical documentation as used in C programming. ()

21. Annette would like to include information in the program documentation that would assist users of the system. Outline four types of information that she should include in the document ()

22. Write a C program code that would prompt user two integer values. The program should then compute the product of the two numbers and display the output ()

23. Outline three reasons for declaring variables in a program ()

24. Distinguish between a bubble sort and selection sort as used in data structures ()

25. Write an algorithm that would be used to add an element into a stack ()

26. Write a C program code that would initialize variable num to 10. The program should display the value and address of variable num ()

27. Explain the use of a flowchart in a program design ()

28. Distinguish between decision tree and decision table as used in program design ()

29. Explain each of the following terms as used in data structures: (i)Queue ii) linked list ()

30. Write a C program code that accepts two strings of not more than 30 characters. The program then join the two string value and display the output ()