0% found this document useful (0 votes)
30 views

Formula Based C Codes

c codes

Uploaded by

chetanaa061195
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views

Formula Based C Codes

c codes

Uploaded by

chetanaa061195
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

CODES TO TAKE

The C programs on basics


1. Print given statement
2. Declare & print variables
3. Find sum of numbers
4. Difference of two numbers
5. Multiplication of two numbers
6. Division of two numbers
7. Find last digit of number
8. Add two digits of a number
9. Sum of 3 digits of a number
10. Sum of 4 digits of a number
11. Reverse of a 4 digit number
12. Swap using third variable
13. Swap without third variable
14. Average of three numbers
15. Find total marks & percentage
16. Solve mathematical expressions
17. Swap with bitwise operator
18. Demonstrate macro definition

DR.AMAR PANCHAL @ AMARTHECODELIFECOACH


The C programs formula based

1. Calculate area of circle


2. Find circumference of circle
3. Calculate area of rectangle
4. Calculate volume of sphere
5. Find surface area of sphere
6. Find area of square
7. Find area of right angle triangle
8. Find area of equilateral triangle
9. Find perimeter of rectangle
10. Find area of triangle
11. Find simple interest
12. Find compound interest
13. Convert days into years
14. Fahrenheit to Celsius conversion

DR.AMAR PANCHAL @ AMARTHECODELIFECOACH


List of C Programs on Decision and Loop
1. Check number is less than 10
2. Check numbers are equivalent
3. Check voting eligibility
4. Check if number is even or odd
5. Enter three angles & check if it is a triangle
6. Find total marks & percentage
7. Check for leap year
8. Check number is +ve, -ve or zero
9. Largest amongst three numbers
10. Print grade of employee
11. Print Color Name
12. Print gross salary of employee
13. Print division scored by student
14. Find greatest among 3 numbers
15. Check if student scored distinction
16. Check type of triangle
17. Check sum of digit greater than 10
18. Print single digit number in words
19. Print numbers in words
20. Read a day of week in digit
21. Perform arithmetic operations
22. Check alphabet is vowel or consonant
23. Check number is even or odd
24. Right Shift & Left Shift Operations

DR.AMAR PANCHAL @ AMARTHECODELIFECOACH


C Programs on Loops covered 1.Print 1 to 15 numbers
2. Print 10 to 1 numbers
3. Sum of first n even numbers
4. Print factorial of a number
5. Number perfectly dividing given number
6. Square roots of 1 to 9 numbers
7. Numbers not divisible by 2, 3, 5
8. Harmonic sequence & its sum
9. Arithmetic progression & its sum
10. Exponential series & its sum
11. Sum of Expanded Geometric Sequence
12. Print right angle triangle pattern
13. Print number pyramid pattern
14. Print mixed right angle triangle
15. Print inverted right angle triangle
16. Print alphabet right angle triangle
17. Print numbered inverted right angle triangle
18. Print alphabet triangle pattern
19. Print number triangle pattern
20. Print star pyramid pattern
21. Sum of first & last digit of number
22. Sum of all digits of number
23. Print reverse of a number
24. Armstrong number
25. Calculate sum of Fibonacci series
26. Calculate H.C.F using while loop
27. Check number is prime or not
28. Print series skipping given numbers
29. Add even & odd numbers
30. Print total marks of student
31. Sum of all +ve & -ve numbers
32. Print odd number right angle triangle
33. Print alphabetic right angle triangle
34. Check if number is palindrome
35. Display each digit in words

DR.AMAR PANCHAL @ AMARTHECODELIFECOACH


36. Print numeric inverted right angle triangle
37. Count zero, odd & even digits

C Programs on Arrays
1. Find max & min array elements
2. Count frequency of each element
3. Decimal into Octal conversion
4. Armstrong number in an array
5. Separate out +ve, -ve and 0s
6. Reverse the array elements
7. Sum of 10 integers
8. Compare sum of given elements
9. Sum of even numbers in array
10. Print odd numbers in array
11. Find sum and average
12. Print max & min array element
13. Search a number in an array
14. Sort array in ascending order
15. Count occurrences of numbers
16. Store & display prime number
17. Sort array in descending order
18. Reverse an array
19. Print largest sum
20. Print two dimensional array
21. Count zeroes in a matrix
22. Sum of two matrices
23. Sum of all elements in matrix
24. Sum of diagonal elements
25. Find transpose of matrix
26. Sum of middle row & column
27. Find product of matrices
28. Find difference of two matrices

DR.AMAR PANCHAL @ AMARTHECODELIFECOACH


29. Sum of lower triangular elements
30. Sum of upper triangular elements

DR.AMAR PANCHAL @ AMARTHECODELIFECOACH


C Programs on Strings
1. Calculate length of string
2. Find frequency of a character
3. Count number of digits in string
4. No. of digits, alphabets & special characters
5. Print string after deleting vowels
6. Reverse a string
7. Reverse string with recursion
8. Check if string is palindrome
9. Find occurrences of character
10. Menu driven program
11. Print ASCII value difference
12. Sort names in alphabetical order
13. Replace a character in string
14. Convert string into uppercase & lowercase
15. Check character is alphabet, digit or punctuation
16. Alternate character in upper case
17. Copy one string into another
18. Menu driven library functions program
19. Count number of white spaces
20. Check character is digit or alphabet
21. Display alternate characters
22. Compare and change two strings
23. Search name in 2D array

DR.AMAR PANCHAL @ AMARTHECODELIFECOACH


C Programs on Functions
1.Perform Arithmetic Operations on integers
2. Calculate simple interest
3. Find cube of a number
4. Area & perimeter of rectangle
5. Calculate exponentiation
6. Calculate x to the power of y
7. Calculate sum of series
8. Check if number is perfect number
9. Perfect numbers between 1 to 50
10. Prime numbers from 1 to 100
11. Print Fibonacci series
21. Print Sum of digits using recursion
22. Find odd and even numbers
23. Convert decimal to binary number
24. Exchange two numbers
25. Find factorial using recursion

DR.AMAR PANCHAL @ AMARTHECODELIFECOACH


C Programs on Files I/O

1.Copy content of one file to another


2. Create text file & print content
3. Append contents of one file to another
4. Copy file & change lower case to upper case
5. Read & display data from file
6. Store records in a file
7. Display alternate characters from file

DR.AMAR PANCHAL @ AMARTHECODELIFECOACH


C Programs on Structures and Union

1. Accept & display employee details


2. Calculate total payment of workers
3. Calculate total runs
4. Calculate age of student
5. Print details of customers
6. Details of highest paid employee
7. Program for Library operations
8. Arrange student record in descending order
9. Menu driven program for a book shop
10. Create structure & display elements
11. Menu driven program for employee structure
12. Arrange student data alphabetically

DR.AMAR PANCHAL @ AMARTHECODELIFECOACH

You might also like