# C Programming Code Examples

## C > Mathematics Code Examples

### C program to Calculate the value of nCr

C++ Programming Array Sort Bubble Sort -
To sort an array in ascending order by bubble sort in C++ language, you have to ask to user to enter the array size then ask to enter array elements, start sorting the array elements by

C Program to Linked List implementation -
Create list, add in the list, delete in the list, append two list, show list, add in beginning, add in end, add after a given element, return to main menu, delete in beginning, delete in

C++ Programming Compares Two Strings -
To compare two Strings in C++, enter the two string and start comparing using the function "strcmp()". If return 0, then both string will be equal and if not return 0, then both string will

Sorting of Less Than 100 Numbers in O(n) -
We can implement the task best using 'Radix' sort. In this algorithm Sorting of data is done from least significant digit to most significant digit. Need 10 different spaces labeled '0 to 9'

Program Prints Prime Numbers Between 2 -
Example to print all 'prime numbers' between two numbers in C++ Language. This problem is solved using nested for loop and if...else. In this program, the while loop is iterated times.

Connected Components of an UnDirected -
Program to find the connected components of the "undirected graph". This can be done using depth first search. Implementation of "Kosaraju's algorithm" to print all SCCs. Fills

Check the Number can be Express as Sum -
Check if an integer can be 'expressed' as the "sum of two Prime Numbers" of all possible combinations with the use of functions. This program takes a positive integer and checks

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