This document provides 24 practice problems for C programming. The problems cover a range of fundamental programming concepts like calculating the area of a triangle, finding roots of a quadratic equation, swapping variables, finding maximum/minimum/average of arrays, sorting arrays, recursion, strings, patterns, series, structures, and file handling. The document was written by Anurag Tewari and is intended as a reference for C programming practice problems.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
49 views1 page
Anurag Tewari, CSE, PSIT-COE
This document provides 24 practice problems for C programming. The problems cover a range of fundamental programming concepts like calculating the area of a triangle, finding roots of a quadratic equation, swapping variables, finding maximum/minimum/average of arrays, sorting arrays, recursion, strings, patterns, series, structures, and file handling. The document was written by Anurag Tewari and is intended as a reference for C programming practice problems.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1
C programs for practice
1. WAP to find area of a triangle using formula if length of 3 sides is given.
S=(s*(s-a)*(s-b)*(s-c))1/2, s=(a+b+c)/2 2. WAP to find roots of a quadratic equation. 3. WAP to swap two variables without using third variable and with using third variable. 4. WAP to find maximum, minimum and average of numbers within a 1d array of integers. 5. WAP to find largest element in 2d Array. 6. WAP to test a year is leap year or not. 7. WAP to test a number is Armstrong or not. 8. WAP to test a number is palindrome or not. 9. Wap to find all prime numbers in a given range. 10.WAP of linear search using pointers(as :array representations). 11.WAP to sort numbers of any array using pointer(Bubble Sort). 12.WAP to print Fibonacci series up to a given nth term without using recursion and with recursion. 13.WAP to find nCr. 14.Wap to calculate matrix multiplication. 15.Wap to calculate transpose of a given nxm matrix . 16.Implement strlen(), strcpy(),strcat(), strrev() functions at your own. 17.WAP to reverse a number without using recursion and with recursion. 18.WAP to find sum of digits of a number without using recursion and with recursion. 19.WAP to implement call by value & call by reference concepts in different programs. 20.WAP to convert binary number into decimal number and vice versa using function. 21.WAP to print floyad’s triangle and pascal’s triangle. 22.WAP to print following patterns(and practice others also): 1 a 12 ab 123 abc 1234 abcd
23.Important series programs:
a) SINE SERIES: sine(x)=x-x^3/3!+x^5/5!-x^7/7!+------x^n/n! b) COS SERIES: cos(x)=1-x^2/2!+x^4/4!-x^6/6!+------x^n/n! c) S= 11-22+33-44+---------UPTO Nth TERM d) S=1/1!+2/2!+3/3!+---- UPTO Nth TERM. 24.Prepare Structures and File handling programs from lab file.