## Write a C program to calculate profit or loss

C program to calculate profit or loss : In this tutorial, we will learn how to find the profit or loss . We will get the cost price and selling price from the user and store it in different variables. And next, we will check if the user had made a profit or loss by […]

## C program to add two numbers using their addresses

C program to add two numbers using their addresses : In this tutorial, we will learn how to add two numbers using addresses in C programming language. Mainly we will learn how to access the values of one address in C. Let’s take a look into the algorithm first : Algorithm : 1. First ask […]

## C program to find the remainder without using modulo operator

C program to find remainder without using modulo operator : In this tutorial, we will learn how to find the remainder without using modulo operator (%) in C programming language. The algorithm that we are going to use is as below : Algorithm : 1. First read the number and divisor as entered by the […]

## C program to count number of 1 using Brian Kernighan’s Algorithm

C program of Brian Kernighan’s Algorithm to count number of 1 in binary representation of a number : In this example, we will learn how to find the count of 1 in the binary representation of a number. For example, the binary value of 3 is 0011 and total number of 1 in this representation […]

## C program to check if a year is leap year or not

C program to check if a year is leap year or not : To check if a year is leap year or not, we need to check if it is divisible by 4 or not. A year is leap year if it is divisible by 4 and for century years, if it also divisible by […]

## C program to calculate the total number of lines in a file

C program to calculate the total number of lines in a file : In this tutorial, we will learn how to find the total number of lines in a file using C programming language. To run the program, just change the path of the file to your own file path. Before going in details how […]

## C program to find the power of a number using loop

C program to find the power of a number : In this ‘C’ example program , we will learn how to find the power of a number . We will take both inputs from the user. Then we will calculate the power and print out the result. Let’s take a look into the program first […]

## C program to remove the vowels from a string

Write a C program to remove the vowels from a string : In this example, we will learn how to remove all the vowels from a string using ‘c’ program. Let’s take a look into the program first : C Program : #include #include //7 int isVowel(char c) { switch(c) { case ‘a’: case ‘e’: […]

## C program to separate even and odd numbers from an array

C program to separate even and odd numbers from an array and put in different array : In this example, we will learn how to separate odd and even numbers from an array and put it in different array. The steps we are going to use in this program is as below : Algorithm : […]

## C program to find the third angle of a triangle if other two are given

C program to find the third angle of a triangle : In this tutorial, we will learn how to find the third angle of a triangle if the first and second angle is given. We know that the sum of all three angles of a triangle is 180 degree. So, to find the third angle, […]