C Program to Find Second Largest and Smallest Elements of an Array

This C Program finds second largest & smallest elements in an Array. Problem Description The program will implement a one dimentional array and sort the array in descending order. Then it finds the second largest and smallest element in an array and also find the average of these two array elements. Later it checks if … Read more

advertisement

C Program to Display the Inventory of Items in a Store

This is a C Program to display the inventory of items in a store. Problem Description This C Program display the inventory of items in a store. Problem Solution The program accepts the value of item name, item code, price, quantity & manufacture date. Then display those value in a structured way. Program/Source Code Here … Read more

advertisement

C Program to Separate Odd and Even Numbers from an Array

This is a C Program to put even & odd elements of an array in 2 separate arrays. Problem Description The program first finds the odd and even elements of the array. Then the odd elements of an array is stored in one array and even elements of an array is stored in another array. … Read more

advertisement

C Program to Reverse a Number

Reverse a Number in C means moving the digit at the last position to the first position and vice versa. For example, if the given number is “1234”, the reverse number will be “4321”. Methods for Reversing a Number in C There are several ways to reverse a number in C language. Let’s take a … Read more

advertisement

C Program to Find the Area of a Triangle

The area of ​​a triangle is defined as the total area bounded by the three sides of a given triangle. Area of a Triangle Formula: If the base and height are given, the area of the triangle is determined using the formula A = If all sides are specified, the area of the triangle can … Read more

advertisement

C Program to Evaluate the Given Polynomial Equation

This is a C Program to evaluate the given polynomial equation. Problem Description This C Program evaluates the given polynomial equation. Problem Solution The polynomial equation formula is P(x)=AnXn + An-1Xn-1 + An-2Xn-2+… +A1X + A0. Program/Source Code Here is source code of the C program to evaluate the given polynomial equation. The C program … Read more

advertisement

C Program to Find Prime Numbers in a Given Range

This is a C program to find prime numbers in a given range. Problem Description The program takes the range and finds all the prime numbers between the range and also prints the number of prime numbers. Problem Solution 1. Take the range of numbers between which you have to find the prime numbers as … Read more

advertisement

C Program to Concatenate Two Strings

String concatenation in C is the technique of joining two strings together to create a single string. If there are two strings, the second string is appended to the end of the first string. “+” operator is used to concatenate the strings. For Example, first string = String; second string = Programs String + Programs … Read more

advertisement

C Program to Find the Area of a Circle

Problem Description Write a C program to calculate the area of a circle using the given radius. What is the area of a circle? The area of a circle is defined as π*r*r, where π is a constant with the value of approximately 3.142 and r is the radius of the circle. Formula to calculate … Read more

advertisement

C Program to Check if a Matrix is an Identity Matrix

This is a program to check if a given matrix is an Identity Matrix Problem Description This C Program checks a given Matrix is an Identity Matrix. Identity matrix is a square matrix with 1’s along the diagonal from upper left to lower right and 0’s in all other positions. If it satisfies the structure … Read more

advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.