2082 Mid-Term examination question paper set for C Programming.
Tribhuvan University
Faculty of Humanities & Social Sciences
OFFICE OF THE DEAN
2026
Bachelor in Computer Applications
| Paper detail | Value |
|---|---|
| Course | C Programming |
| Code No. | CACS151 |
| Semester | IInd |
| Full marks | 60 |
| Pass marks | 24 |
| Time | 3 hours |
Candidates are required to answer the questions in their own words as far as possible.
Group B
2. Differentiate between while loop and do while loop. Write a program to check if the given number is prime or composite. (2+3)(2+3)(2+3)
3. Write a program to add, subtract, and multiply two numbers.
4. Write a program to swap elements.
5. What is function? Explain different types of function?
6. Write a program to find the factorial of a number.
7. WAP to write a following program: 1+1/1!+2/2!+.....n/n!1+1/1!+2/2!+.....n/n!1+1/1!+2/2!+.....n/n!
8. What is data type? Why do we need it in Programming? Explain three basic data types with suitable example. (1+1+3)(1+1+3)(1+1+3)
Group C
9. Write a program to make a simple calculator using switch statement. What is operator? Explain different operators in used in C.
10. WAP to find the division of two numbers using function? (No parameter, Return type).
11. What is loop. Explain the benefit of loop.