Practice sessions:
1.Write a simple program that prints the results of all the operators available in C (including pre/
post increment , bitwise and/or/not , etc.). Read required operand values from standard input.
2. Write a simple program that converts one given data type to another using auto conversion and
casting. Take the values from standard input.
3.Write a program for finding the max and min from the three numbers.
4.Write the program for the simple, compound interest.
5.Write a program that declares Class awarded for a given percentage of marks, where mark = 70% =
Distinction. Read percentage from standard input.
6.Write a program that prints a multiplication table for a given number and the number of rows in
the table. For example, for a number 5 and rows = 3, the output should be:5 x 1 = 5 f. 5 x 2 = 10
5 x 3 = 15
8.Write a C program, which takes two integer operands and one operator from the user, performs
the operation and then prints the result. (Consider the operators +,-,*, /, % and use Switch
Statement)
9.Write a program that finds if a given number is a prime number
10. Write a C program to find the sum of individual digits of a positive integer and test given number
is palindrome.
11. A Fibonacci sequence is defined as follows: the first and second terms in the sequence are 0 and
Subsequent terms are found by adding the preceding two terms in the sequence. Write a C program
to generate the first n terms of the sequence.
12. Write a C program to generate all the prime numbers between 1 and n, where n is a value
supplied by the user.
13.Write a C program to find the roots of a Quadratic equation.
14Write a C program to find the minimum, maximum and average in an array of integers.
16.Addition of Two Matrices e
.17Multiplication of Two Matrices
18.To find the factorial of a given integer.
19.Write a program for reading elements using a pointer into an array and display the values using
the array.
20Write a program for display values reverse order from an array using a pointer.
21 Write a program through a pointer variable to sum of n elements from an array.
22Write a C program to display the contents of a file to standard output device.
23 Write a C program which copies one file to another, replacing all lowercase characters with their
uppercase equivalents.
24Write a C program to merge two files into a third file (i.e., the contents of the first file followed by
those of the second are put in the third file).
25 To delete n Characters from a given position in a given string.
26 Write a C program to determine if the given string is a palindrome or not (Spelled same in both
directions with or without a meaning like madam, civic, noon, abcba, etc.)
27Write a C program that uses non recursive function to search for a Key value in a given
list of integers using linear search method.
28Write a C program that uses non recursive function to search for a Key value in a given
sorted list of integers using binary search method.
29Write a C program that implements the Bubble sort method to sort a given list of
integers in ascending order.
30Write a C program that sorts the given array of integers using selection sort in descending order.
31Write a C program that sorts the given array of integers using insertion sort in ascending order