0% found this document useful (0 votes)
5 views2 pages

Intro To Programminng

This document is an examination paper for the course ICS 2102: Introduction to Computer Programming at Jomo Kenyatta University, covering various topics related to C programming. It includes questions on high-level languages, differences between compilers and interpreters, types of errors in programming, and basic programming tasks. Students are required to answer one mandatory question and any two additional questions within a two-hour time frame.

Uploaded by

maxwillie235
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views2 pages

Intro To Programminng

This document is an examination paper for the course ICS 2102: Introduction to Computer Programming at Jomo Kenyatta University, covering various topics related to C programming. It includes questions on high-level languages, differences between compilers and interpreters, types of errors in programming, and basic programming tasks. Students are required to answer one mandatory question and any two additional questions within a two-hour time frame.

Uploaded by

maxwillie235
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

W1-2-60-1-6

JOMO KENYATTA UNIVERSITY OF AGRICULTURE AND TECHNOLOGY


University Examinations 2016/2017
YEAR I SEMESTER II EXAMINATION FOR THE DEGREE OF BACHELOR OF
BUSINESS INFORMATION TECHNOLOGY

ICS 2102: INTRODUCTION TO COMPUTER PROGRAMMING

DATE: JULY, 2017 TIME: 2 HOURS

INSTRUCTIONS: Answer Question ONE and Any Other TWO Questions.

Question One – 30 Marks

a) i. C is a high level language. Explain why “high level” term. [2 marks]

ii. Give three operational differences between the compiler and interpreter.
[6 marks]

b) Using relevant examples discuss the importance of C programming languages.


[6 marks]

c) Using relevant examples discuss the importance of C programming languages.


[6 marks]

d) Explain how values are assigned to variables. [2 marks]

e) There are basically three types of errors in writing computer programs. State and explain
these errors. [6 marks]

f) Define the following terms as used in computing. [2 marks]

i. Object code
ii. Debbuging
iii. Compiles
iv. Computer program

1
Question Two – 20 Marks

a) Explain three types of errors in programming using relevant examples. [6 marks]

b) Write a C programming that will output the following line of text “welcome to C
programming”. [8 marks]

c) Explain the difference between the while loop showing the difference in their syntax.
[6 marks]

Question Three – 20 Marks

a) Differentiate between functions and variables in programming. [4 marks]

b) What is a data type? Explain four basic data types in C. [8 marks]

c) Explain the significance of the following lines C programming. [8 marks]

Question Four – 20 Marks

a) Write a C program in C for prime number between 1 and 100. [6 marks]

b) Explain the output of the following program [6 marks]

#include a=6, b=10


PrintC (“a=%, d/n; a++);
printC(“b=%.d/n; ++b);

c) Write down the errors in the following code. [8 marks]

#include std10.h
Int numbers
PrintF(“enter an integer number”)
ScanF (“%” C number.
/C number <100
PrintC “your number is smaller than two”
Else print F (“your number contains more than two digits.)

You might also like