Imperative Programming Practical

List of Practical: 

1. Basic Programs:
a. Write a program to display the message HELLO WORLD.
b. Write a program to declare some variables of type int, float and double. Assign some values to these variables and display these values.
c. Write a program to find the addition, subtraction, multiplication and division of two numbers.

2. Programs on variables:
a. Write a program to swap two numbers without using third variable.
b. Write a program to find the area of rectangle, square and circle.
c. Write a program to find the volume of a cube, sphere, and cylinder.

3. Conditional statements and loops(basic)
a. Write a program to enter a number from the user and display the month name. If number >13 then display invalid input using switch case.
b. Write a program to check whether the number is even or odd.
c. Write a program to check whether the number is positive, negative or zero.
d. Write a program to find the factorial of a number.
e. Write a program to check whether the entered number is prime or not.
f. Write a program to find the largest of three numbers.

4. Conditional statements and loops(advanced)
a. Write a program to find the sum of squares of digits of a number.
b. Write a program to reverse the digits of an integer.
c. Write a program to find the sum of numbers from 1 to 100.
d. Write a programs to print the Fibonacci series.
e. Write a program to find the reverse of a number.
f. Write a program to find whether a given number is palindrome or not.
g. Write a program that solve the quadratic equation
   
       
h. Write a program to check whether the entered number is Armstrong or not.
i. Write a program to count the digit in a number

5. Programs on patterns:
a. Programs on different patterns.

6. Functions:
a. Programs on Functions.

7. Recursive functions
a. Write a program to find the factorial of a number using recursive function.
b. Write a program to find the sum of natural number using recursive function.

8. Arrays
a. Write a program to find the largest value that is stored in the array.
b. Write a program using pointers to compute the sum of all elements stored in an array.
c. Write a program to arrange the ā€˜n’ numbers stored in the array in ascending and descending order.
d. Write a program that performs addition and subtraction of matrices.
e. Write a program that performs multiplication of matrices.

9. Pointers
a. Write a program to demonstrate the use of pointers.
b. Write a program to perform addition and subtraction of two pointer variables.

10. Structures and Unions
a. Programs on structures.
b. Programs on unions.