You are on page 1of 5

ULK POLYTECHNIC INSTITUTE

C-PROGRAMMING MODULE
Lecturer: Eng. Innocent Tujyinama
Phone Number:+250789937824, +250786408009
Email: innotuj@gmail.com

MODEL QUESTIONS
1. Develop a C program to find roots of quadratic equation.

2. Develop a C Program to compute GCD and LCM of two numbers.

3. Develop a C-program to read elements of two matrices A and B, that program must
perform the product of those two matrices.

4. Write down a C program which asks the user to enter n elements of an


array and also that program must sort those array elements in ascending
order.

5. Write down a C-program to check if a given number is Even or Odd by using ONLY
Conditional Operator.

6. Develop a C-program to compute and display addition of even numbers and


product of odd numbers for an array of any 8 numbers inputted through the
keyboard.

7. Develop C- program to print Sum of all integers between n1 and n2 divisible by 5.

8. Write down a C Program to read a decimal number and Convert it to binary number

9. Based on symbol, priority, associativity and concretes examples, explain in detail


different types of Bitwise operators, we have in C programming language.

C-Programming Model Questions 1


10. Design a C program to generate N-Fibonacci numbers by Using Arrays.

11. Explain in detail this term Variable mostly used in C programming language.
Discuss different Rules to be followed to form a variable.

12. Suppose that you have been appointed as a new Software Engineer of Kigali
Independent University (ULK). You are requested to Develop a C-program by using
structures to manage the students’ data. That C-Program must ask the user to
enter the details of every student (First Name, Last Name, Registration Number,
University, Campus, School, Department, Age, Country, Province, District, Sector,
Cell & Phone Number) of Kigali Independent University (ULK). After entering all
details of all students, that program must display the details of all those students
on screen.

13. Explain this term Data Type mostly used in C programming language. Discuss
Basic/Simple/Primitive Data types, we find in C programming language. Support
your discussion with concrete examples.

14. Suppose that you have been appointed as a new IT Manager of Kigali
Independent University (ULK). You are requested to write a C-program by using
structures to manage the library books. That C- Program must ask the user to enter
the details of every book (Title, Author, Publisher, Number of Pages, Edition, Price,
Year of Publication and Place of publication) of Kigali Independent University (ULK)
Library. After entering all details of all books, that program must display the details
of all those books on screen.

15. Explain in detail this term Keyword mostly used in C programming language.
Discuss the Rules to be followed while using the keywords.

16. Develop a C-Program to Perform Arithmetic Operations (Multiplication, Division,


Modulus, Subtraction and Addition) by using Pointers.

C-Programming Model Questions 2


17. Develop C- program to check if a given Number is a Prime Number or not.

18. Briefly but clearly discuss different types of tokens, we have in C Programming
language. Support your discussion with concrete examples.

19. Develop a C program to print the grade obtained by a Student, based on his/her
average marks.

Note: The relation between the grades and marks is shown below:

Marks Grades
0 to 49.999 F (Fail)
50 to 59.999 D
60 to 69.999 C
70 to 79.999 B
80 o 89.999 A
90 to 100 O (Outstanding)

20. The Body Mass Index (BMI) is commonly used by health and nutrition
professionals to estimate human body fat in populations. Develop a C- program to
calculate BMI (Body Mass Index). That program must print if the result falls under
‘underweight’, ‘normal’, ‘overweight’ or ‘obese’.

Note: if BMI is:


 Less than 18.5 = Underweight
 Between 18.5 to 24.9 = Normal
 Between 25 to 29.9 = Overweight
 30 or more than 30 = Obese

21. Based on symbol, priority, associativity and concretes examples, Discuss in detail
different types of Relational operators, we find in C programming language.

C-Programming Model Questions 3


22. Based on enumeration constant mostly used in C-programming language, write
down the output of the following C program.

#include<stdio.h>
int main()
{
enum months {JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV,
DEC };

printf("February=%d\n",FEB);
printf("March=%d\n",MAR);
printf("April=%d\n",APR);
printf("May=%d\n",MAY);
printf("June=%d\n",JUN);
printf("July=%d\n",JUL);
printf("August=%d\n",AUG);
printf("September=%d\n",SEP);
printf("October=%d\n",OCT);
printf("November=%d\n",NOV);
printf("December=%d\n",DEC);

return 0;
}

23. Develop a C-program to read elements of two matrices A and B, that program must
perform addition of those two matrices.

24. Develop a C- program to simulate the function of a simple calculator (This is


sometimes called a "four-functions" calculator.)

25. Develop a C-program to find the Factorial of a Number N.


C-Programming Model Questions 4
26. Explain in detail this term Identifier mostly used in C programming language.
Discuss different Rules to be followed to form an identifier.

27. What is the hierarchy of operations for arithmetic, logical and relational operators?

28. Develop a C-program to read elements of two matrices A and B, that program must
perform Subtraction of those two matrices.

29. Explain increment and decrement operator.

30. Develop a C-program to check if a given number is a palindrome number or not.

31. Explain in detail this term Keyword mostly used in C programming language. Write
down atleast 10 keywords, we do find in C-programming.

32. Based on symbol, priority, associativity and concretes examples, explain in detail
different types of Logical operators, we have in C programming language.

33. Develop a C-program to check if a given year is leap or not

34. What is an assembler? What is a compiler?

35. What is ternary operator? Explain with syntax and a suitable example

36. Develop a C program to read a number & reverse it.

END

Prepared by:
Eng. Tujyinama Innocent (Bsc, MCA)

C-Programming Model Questions 5

You might also like