C Programs for Practice

Topic: Variables, initialisation, Datatypes, Modifiers, Format Specifiers, Escape Chars, user input and Output

1. Write a C Program to print your correspondence details in the below format:
YourName,
S/o Father Name,
D.No. xx-xx/xxx,
Street Name,
City Name,
State
Pin: xxx xxx

 

2. Write C Program to print the following Output:
1 x 2 = 2
2 x 2 = 4
3 x 2 = 6
4 x 2 = 8
5 x 2 =10

 

3. Write C program to create a variable with identifier ‘num’, initialise it with 25 and display the value on the monitor.

4. Write C program to display the memory size of the variables declared with all basic data types of C language.

5. Write C program to declare variables with all basic datatypes of C language, initialise them and display them back.

6. Write C Program to print area of rectangle for the given length and breadth.

7. Write a C program to accept a decimal value from the user and display back on the monitor.

8. Write C program to display the sum of any two user entered numbers

9. Write C program to display the product of any two decimal point numbers

10. Write C program to display the ASCII value of the number entered by the user.

11. Write C program to exchange the existing values of two variables and display them.

12. Write C Program to convert the temperature value from Fahrenheit to Celsius.

13. Write C Program to calculate and print Simple Interest for the user entered Principle, Rate of Interest and Tenure

Topic: Operators, Control Statements

1. Write C Program to check whether the user entered number is natural number or not.
2. Write C program to check the given number is positive, negative or equal to zero.
3. Write C program to check the given number is even or odd
4. Write C program to check the given number is multiple of 5 or not
5. Write C program to check the user entered english alphabet is vowel or consonent
6. Write C program to find out the bigger of two numbers

You cannot copy content of this page