 C Programming Code Examples

C > If Else and Switch Case Code Examples

C program to enter basic salary and calculate gross salary of an employee

Finds out the Roots of Quadratic Equation - C Program calculates the roots of a quadratic equation. First it finds Discriminant using the Formula: Disc = 'y*y-4*x*z'. There are 3 types of roots. They are complex, distinct and equal

C Codes Multiply 2 Numbers use Function - Create a user defined function product() that multiplies the numbers that we are passing to it during function call. This c function returns the product of these numbers. To understand

Reads Input until Enters a Positive Integer - C Language program to read input until user enters a positive integer. Positive Numbers 1, 2, 3... are known as natural numbers. C code below takes a positive integer (let say n) as...

Counting program code in The C language - Counting is sequence of whole numbers in ascending order without zero. Developing a program of counting in C language is easy and we shall see here in this chapter. Count

In C++ Graph Coloring on Bipartite Graph - The problem takes a bipartite graph as input and outputs colours of the each vertex after 'coloring the vertices'. The "Bipartite Graph" is a graph in which the set of vertices can be

Print Combination of 2 Words of 2 Strings - Print combination of two words of two given strings without any repetition. Incrementing the count if the characters of the main string match with the characters of the given word.

Calculates the Mean Variance & Deviation - This C Program calculates the mean, variance and standard deviation. The formula which is used in this c program are mean = average of the numbers. var=(summation( ( Xj - average

C Code Increment & Decrement Operators - C programming language has two operators increment ++ and decrement -- to change the value of an operand (constant or variable) by 1. Increment ++ increases value by 1 whereas