0% found this document useful (0 votes)
93 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.
Copyright
© © All Rights Reserved
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% found this document useful (0 votes)
93 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.
Copyright
© © All Rights Reserved
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

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.
[Link] of linear search using pointers(as :array representations).
[Link] to sort numbers of any array using pointer(Bubble Sort).
[Link] to print Fibonacci series up to a given nth term without using recursion and with
recursion.
[Link] to find nCr.
[Link] to calculate matrix multiplication.
[Link] to calculate transpose of a given nxm matrix .
[Link] strlen(), strcpy(),strcat(), strrev() functions at your own.
[Link] to reverse a number without using recursion and with recursion.
[Link] to find sum of digits of a number without using recursion and with recursion.
[Link] to implement call by value & call by reference concepts in different programs.
[Link] to convert binary number into decimal number and vice versa using function.
[Link] to print floyad’s triangle and pascal’s triangle.
[Link] to print following patterns(and practice others also):
1 a
12 ab
123 abc
1234 abcd

[Link] 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.
[Link] Structures and File handling programs from lab file.

Anurag Tewari, CSE, PSIT-COE.

You might also like