PROGRAM NATIONAL DIPLOMA IN INFORMATION TECHNOLOGY
COURSE UNIT PROGRAMMING LANGUAGES FUNDAMENTALS NCCM221
Date 29th, April, 2025
Time Allowed (3 hrs.)
Lecturer Mr. Yiga Moses
Instructions
Indicate your name, registration number on the answer booklet
This consists of two sections A and B, section one is compulsory and answer three questions
in section B
SECTION A
Question one
Explain the following terms as they are used in c programming. (2@marks)
1) Variable
2) Reserved words
3) Data types
4) Compiler
5) Translator
6) Interpreter
7) Debug
B) Complete the tables below (5 marks)
DATA TYPE DECLARATION STORAGE
Integer %d
Float
character
%s
double
C) (9marks)
Symbol Meaning
=
==
!=
!
&&
//
/* */
<=
#
Question two
Explain the code structure below (12 marks)
//fundamentals of programming
/*Test*/
#include<stdio.h>
Main( )
{
int x;
printf(“fundamentals of programming is very easy. \n”);
return(0);
}
SECTION B
Question three
Write a program to carry out the basic arithmetic operations, calculates and returns the
answers (20 marks)
Question four
Using a for loop, write a program to display even numbers from 2 to 14 (20 marks)
Question five
You are invited by IMLS to develop a program to that will help grade students’ marks using
the criteria bellow; practically show how you would go about it. (20 marks)
MARKS GRADE COMMENT
FROM TO
0 49 F RETAKE
50 59 C FAIR
60 69 B GOOD
70 79 B+ VERY GOOD
80 100 A EXCELLENT
Question six
Using an IF statement, write a c program to Display days of the week and the respective
activities using numbers (20 marks)
END