Вы находитесь на странице: 1из 4

List of C Programs

Simple Programs

1. Example for formatting the Input and Output.


2. To find the Sum of given two numbers.
3. To find the area of a Circle.
4. To find the area of Triangle.
5. To find the Simple Interest, Compound Interest & Difference between them.
6. To convert the temperature from foreign height to centigrade.
7. To convert the temperature from centigrade to foreign height.

Programs Using Conditions.

1. To check whether the given number is Odd or Even.


2. To check whether the student is Passed or Not.
3. To find the Maximum of given three numbers.
4. To find the roots of a quadratic equations.
5. To display the result of a student.
6. To display the given digit in words.

Programs using While / do-while loops.

1. To find the factorial of a given number.


2. To find the sum of the digits of a given number.
3. To find the reverse of a given number.
4. To check whether the given number is Armstrong or not.
5. To print the Fibonacci series up to a given number.
6. To count no. of Alphabets, Digits and Special Characters using isalpha(), isdigit() functions.
7. To count no. of Alphabets, Digits and Special Characters without using isalpha(), isdigit() functions.

Programs using for loop.

1. To print the 1st ‘n’ natural numbers.


2. To print the Odd numbers up to a given number.
3. To print the Even numbers up to a given number.
4. To find the minimum and maximum of a given list, without using arrays.
5. To find the minimum and maximum of a given list along with the positions, without using arrays.
6. To find the Sum of 1st ‘n’ natural numbers.
7. To find the factorial of a given number.
8. To print the table for a given number.
9. To print the 1st ‘n’ terms of the Fibonacci series.
10. To print the factors for a given number.
11. To find the Sum of the factors of a given number.
12. To check whether the given number is Perfect or not.
13. To check whether the given number is Prime or not.

Programs using goto, break, continue

1. Example for break statement.


2. Example for continue statement.
3. To print 1st ‘n’ natural numbers using goto.
4. To print the Fibonacci series up to a given number, using goto.

Programs using Arrays.

1. To find the minimum and maximum of a given list.


2. To find the minimum and maximum of a given list along with the positions.
3. To count the no. of occurrences of an element in a given list along with position.
4. To remove the repeated occurrences of an element in a given list.
5. Program for Linear Search.
6. Program for General Sort.
7. Program for Matrix Addition, using 2D Arrays.
8. Program for Matrix Subtraction, using 2D Arrays.
9. Program for Matrix Multiplication, using 2D Arrays.
10. Program for Matrix Transpose, using 2D Arrays.
11. Program for finding the diagonal sum of a given Matrix.
12. Program to check whether the given Matrix is Symmetric or not.
13. Program for Matrix Addition, using 3D Array.
14. Program for Matrix Subtraction, using 3D Array.
15. Program for Matrix Multiplication, using 3D Array.
16. Program for Matrix Transpose, using 3D Array.
17. Program to check whether the given matrix is Magic Matrix or not.
18. Programs to implement the following, using 1D arrays.
I. Diagonal Matrix
II. Tridiagonal Matrix
III. Upper Triangular Matrix.
IV. Lower Triangular Matrix.
V. Sparse Matrix

Programs using functions.

1. Example for many sub functions.


2. Example for nesting of function calling.
3. To find the Sum of given two numbers.
4. To find the Area of a Circle.
5. To find the Area of a Triangle.
6. To find the Simple Interest.
7. Example for void function.
8. To find the factorial of a given number (iterative method).
9. To find the factorial of a given number (using recursive function).
10. To find the sum of 1st ‘n’ natural numbers (using recursive function).
11. To print the 1st ‘n’ terms of Fibonacci series (using recursive function).
12. Example for call-by-value parameter passing.
13. Example for call-by-reference parameter passing
14. Example for obtaining many results from a single function.
15. Example for passing the arrays as parameters.

Programs for Pointers & DMA

1. Example for Addresses.


2. Example for Printing the value using pointer.
3. Example for Pointer to Array.
4. Example for Array of Pointers.
5. To sort a given list using DMA.

Programs for Characters and Strings.

1. Illustration of getch(), getche(), getchar().


2. Illustration of putch(), putchar().
3. To count the no. of Alphabets, Digits & Special Characters from a text file, without using arrays and files, without isalpha() and isdigit().
4. To count the no. of Alphabets, Digits & Special Characters from a text file, without using arrays and files, using isalpha() and isdigit().
5. To count the no. of Alphabets, Digits & Special Characters from a text file, using arrays, , without isalpha() and isdigit().
6. To count the no. of Alphabets, Digits & Special Characters from a text file, using arrays, using isalpha() and isdigit().
7. Illustration of difference between scanf() & gets()
8. Illustration of difference between puts()
9. Illustration of strlen()
10. Illustration of strrev()
11. Illustration of strupr() & strlwr()
12. Illustration of strcpy() & strncpy()
13. Illustration of strcmp()
14. Illustration of strstr() & strchr()
15. To check whether the given string is palindrome or not without using strlen() , strrev() & strcmp().
16. To check whether the given string is palindrome or not, by using strlen() , strrev() & strcmp().
17. To sort a list of strings.
18. Write the programs for the following, without using library functions.
I. To find the length of the given string.
II. To find the reverse of the given string.
III. To find the upper of the given string.
IV. To find the lower of the given string.
V. To compare two strings.
VI. To search for a string in a given string.
VII. To search for a character in a given string.
VIII. To insert a character at a particular position.
IX. To delete a character at a particular position.
X. To delete a specified character.

Programs for Structures.

1. To find the area and circumference of a circle using structure.


2. To find the sum of given two times.
3. To find the difference between two dates.
4. Example for Initializing a structure variable.
5. Example for Nested Structure and Initialization.
6. Example for passing the Structures as parameters.
7. Example for passing the Address of Structure as parameters.
8. Example for Array of Structure.
9. Example for Dynamic Structure.
10. Example for Union.

Programs for Storage Classes.

1. Different Examples to illustrate Scope.


2. Example to illustrate Static Variable.
3. Example to show the difference between auto and static.

Programs for Preprocessor and Macros.

1. Different Examples for Macros (define command).


2. Different Examples for #ifdef, #ifndef, #else etc.

Programs for Files.

1. To create a text file, using fputc().


2. To display the contents of a text file, using fgetc().
3. To count the no. of Alphabets, Digits & Special Characters from a text file.
4. To copy a text file into another.
5. To create a data file using fprintf()
6. To retrieve a data file using fscanf()
7. To create a data file using fwrite()
8. To retrieve a data file using fread()
9. Example for Random access of a data file, using fseek().
10. To create file of integers using putw()
11. Split the given file of integers in to two files Odd file & Even file.

Вам также может понравиться