# C Programming Code Examples

## C > If Else and Switch Case Code Examples

### Compare two integers in C

C++ Find Minimum Element Linear Search -
First 'Compare the Element' at the beginning with another array element sequentially. And swap values if the element at the beginning is Larger than the other element. This value will

Increment Operator Decrement Operator -
Basic "arithmetic operators" are +, -, *, /, %. "Increment operator" is ++ and "decrement operator" is --. These operators can be used as before the variable (prefix) and after the

C++ Program Check if it is a Sparse Matrix -
This is a C++ Program code to check 'sparsity' of a matrix. If the number of zeros in a matrix exceeds (n*m)/2, n and m is the dimension of the matrix, matrix is sparse matrix. Enter the

C Performing Comb Sort Array of Integers -
C Program to performs Comb sort on array of integers. "Comb Sort" is a comparison sorting algorithm. This sort is 'Exchange sort', similar to 'Bubble Sort'. Function to find the new gap

Remove Spaces from Strings or Sentences -
To remove or delete spaces from the string or sentence, enter a 'string'. Then start checking for spaces. If 'Space will be Found', then start 'Placing the next character' from the space to

C Language Program Implement Cyclesort -
C Program implements 'Cyclesort'. Cycle sort is an in-place, unstable 'Sorting Algorithm', a comparison sort that is theoretically optimal in terms of the total number of writes to the

Global Variables in The C++ Programming -
In C++ Language, a variable declared outside of any function ("Including Main as Well") is called "global variable". Global variables have their scope throughout the program, So they

Computes DFT Discrete Fourier Transform -
C++ Program to compute the 'coefficients' of the DFT (Discrete Fourier Transform) directly. In math, the discrete Fourier transform (DFT) converts finite list of equally spaced samples