C Program to Find Simple Interest

Problem Description Write a Simple Interest Program in C using the SI formula. What is Simple Interest in C? Simple Interest is the amount of money that a borrower pays to a lender as a percentage of the principal amount borrowed. Common terms in the calculation of Simple interest: Principal: The amount of money borrowed. … Read more

advertisement

C Program to Convert Days into Years, Months and Days

This a C program which converts a given number of Days in terms of years, weeks & days. Problem Description This program takes the number of days as input and converts in terms of years, weeks & days. Problem Solution 1. Take the number of days as input. 2. For the number of years, divide … Read more

advertisement

C Program to Swap Two Numbers without using Temporary Variables or Arithmetic Operator

This is a C Program to swap the contents of two numbers using bitwise xor operation. Problem Description This C Program swaps the contents of two numbers using bitwise XOR operation. Problem Solution Take input from the user and swaps the contents of two numbers using bitwise XOR operation. Program/Source Code Here is source code … Read more

advertisement

C Program to Convert Decimal to Binary and Count the Number of 1s

This is a C Program to convert a decimal number to binary & count the number of 1s. Problem Description This C Program converts a decimal number into binary & count the number of 1s. Problem Solution The program uses module operation and multiplication with base 2 operation for conversion. It also uses modulo operation … Read more

advertisement

Leap Year Program in C

Problem Description Write a C Program to check whether a given year is a leap year or not. What is a Leap Year? A leap year is a year with 366 days, instead of the usual 365 days. This is because the Earth takes slightly longer than 365 days to orbit the Sun. To determine … Read more

advertisement

C Program to Find the Sum of Each Row and Column of a Matrix

This is a C program to calculate the sum of the elements of each row & column in a given matrix. Problem Description This C program reads a matrix A (MxN) & finds the following using functions a) Sum of the elements of each row b) Sum of the elements of each column c) Find … Read more

advertisement

C Program to Find Product of Two Matrices

This is a program to compute the product of two matrices. Problem Description This C Program computes the product of two matrices. This program accepts the 2 matrices and then find the product of 2 matrices. Problem Solution 1. Create three 2D arrays, third matrix will store the product of first two matrices. 2. Read … Read more

advertisement

C Program to Check Whether a Given Number is Even or Odd

Even Number: A number is said to be an even number if it is completely divisible by 2. In other words, if a number is divided by 2 and leaves a remainder of 0, then it is said to be an even number. Example: 36, 24 Odd Number: A number is said to be an … Read more

advertisement

C Program to Find the Largest Number Among Three Numbers

In C programming, the largest element of a number is the number with the highest numerical value of the three numbers. For example, if three numbers are given, 1, 2, 3, the largest of the three numbers is 3. Problem Description Write a C program that takes the 3 numbers and finds the largest number … Read more

advertisement

C Program to Calculate the Value of sin(x)

This is a C Program to calculate the value of sin(x). Problem Description This C Program Calculates the Value of sin(x). Problem Solution It’s a non-differentiable function. Start at zero, then goes up to 1, then back down to 0. But then, instead of going negative, it will just “reflect” about the x-axis. The derivative … 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.