You are on page 1of 2

Computer Programming

Unit-II: Introduction to C
Question Bank
1. Write a C program to check the entered character whether it is vowel or consonant.[4M]
2. Write a C program to check whether a number is even or odd. [4M]
3. Write a C program to check whether a number is negative, positive or zero. [4M]
4. Write a C program to calculate profit or loss. [4M]
5. Write a C program to input basic salary of an employee and calculate its Gross salary
according to following:
Basic Salary <= 10000 : HRA = 20%, DA = 80%
Basic Salary <= 20000 : HRA = 25%, DA = 90%
Basic Salary > 20000 : HRA = 30%, DA = 95% [4M]
6. Write a C program to print day of week name using switch case. [4M]
7. Write a C program to display the sum of even numbers between 1 to 10. [4M]
8. Explain various operators in C. [4M]
9. Differentiate while, do-while and for loop structures. [7M]
10. Write C function to interchange two variables without using third variable. [7M]
11. Explain use of “break” and “continue” keywords in “C” with suitable example. [6M]
12. What do you understand by precedence of arithmetic operators ?How does it work in C
program ? Give suitable example. [6M]
13. Explain characteristics of programming language. [4M]
14. Explain different data types, its range with format specifier and size in C. [4M]
15. Write a program to print the output like: [4M]
*
* *
* * *
* * * *
* * * * *

16. Write a C program to accept an integer & find the sum of its digits. [4M]

17. Write a C program to count number of digits in an integer. [4M]

18. Write a C program to accept an integer & display it in reverse order. [4M]

19. Write C function to interchange two variables using third variable. [4M]
20. Write a program to print the output like:

*
**
***
****
*****

You might also like