Get premium membership and access revision papers, questions with answers as well as video lessons.
Got a question or eager to learn? Discover limitless learning on WhatsApp now - Start Now!

Dit 0202: Introduction To Programming And Algorithms Question Paper

Dit 0202: Introduction To Programming And Algorithms 

Course:Diploma In Information Technology

Institution: Jomo Kenyatta University Of Agriculture And Technology question papers

Exam Year:2012



JOMO KENYATTA UNIVERSITY
OF
AGRICULTURE AND TECHNOLOGY
University Examinations 2012/2013
STAGE TWO EXAMINATION FOR THE DIPLOMA
IN INFORMATION TECHNOLOGY
DIT 0202: INTRODUCTION TO PROGRAMMING AND ALGORITHMS
DATE: APRIL 2013 TIME: 1 ½ HOURS
INSTRUCTIONS: Answer Question ONE and any other TWO Question

Question One (30 Marks)

a) Briefly explain the following terms: (10 Marks)

(i) Programming

(ii) Decision table

(iii) Object Oriented Programming

(iv) Generality

(v) Portability

b) Programming errors are likely to appear during program design. Highlight any FOUR (4) types of such errors. (4 Marks)

c) Write a program code that drinks on screen the words “Welcome to Kisii Campus of Jomo Kenyatta University” (4 Marks)

d) Write a program code that prompts for first name and age from a user, then displays them as “Your first name is …………………… and Your Current Age is …………. (4 Marks)

e) Define the term data type then list the various data types used in C programming language. (4 Marks)

f) Explain the terms Dseadocode and algorithm as used in program design. (4 Marks)

g) Define the term identifier, giving rules that an identifier must conform to. (4 Marks)

h) Explain each of the following control structures, giving an example in each

(i) Sequence

(ii) Iteration (4 Marks)

i) List any FOUR (4) examples of C programming keywords. (2 Marks)

Question Two (20 Marks)

a) Arrays are important data structures in C programming language.

(i) Define an array (2 Marks)

(ii) Write a program code to demonstrate how an array is used. (5 Marks)

b) Explain FIVE (5) characteristics of programming languages. (5 Marks)

c) Execution of a C program takes four stages. Illustrate these stages using diagrams. (4 Marks)

d) Briefly explain the structure of a C program. (4 Marks)

Question Three (20 Marks)

a) Define the terms variable as used in C programming giving an example. (2 Marks)

b) Write a program code that uses a string, prompts for district of burth and then display the details on screen (5 Marks)

c) Write a C program code that accepts FIVE (5) values then finds their sum, average and prints this on screen. (8 Marks)

d) Explain what you understand by the terms top-down and bottom-up approach in program development. (5 Marks)

Question Four (20 Marks)

a) Write a program that uses a while loop that prompts a user to enter his/her age then prints on screen a sequence of values if age entered more than 20. (10 Marks)

b) Programming practices are the core to successful program design. Highlight these practices. (10 Marks)






More Question Papers


Popular Exams



Return to Question Papers