# C Programming Code Examples

## C > For Loops and While Loops Code Examples

### find sum of prime numbers in given range

C Language code Hsort, heap sort [array] -
Array of MAXARRAY length. Preform the heapsort. Help heapsort() to bubble down starting at pos[ition]. Load some random values into the array. Print the original array.

C++ Sample Code Implement Bucket Sort -
Divide the range into equal parts and assign a 'bucket' to each part. Split the data and insert them into the Corresponding bucket by using insertion sort. 'Merge' all the buckets into one

C Program code to Subtract two matrices -
C language read elements in two matrices and find the difference of two matrices. Subtract two matrices in C. Elements of two matrices can only be subtracted if and only...

Built-in Data Types in C++ Programming -
Any programming language has built in data types. Data types are used to create variables or your new data types. Variable is a amount of memory that has its own name and value.

Program Convert Decimal to Hexadecimal -
In C++ programming, you have to ask to the user to enter the desired decimal number to convert it into hexadecimal number to print the equivalent value in hexadecimal format

Program Find HCF (GCD) of Two Numbers -
Program code input two numbers from user and find the HCF using for loop. HCF (Highest Common Factor) is the greatest number that divides exactly two or more numbers. HCF is

Converts Octal Number to Binary Number -
The octal number is converted to decimal at first. Then, the decimal number is converted to binary number. The octal number entered is passed to convertOctalToBinary() function.

Generate All Possible Combinations of List -
Algorithm takes the input of 'n' data element and prints all 'possible combination'. For that, it maintains a boolean 'Array of Length' "n". If the corresponding boolean value is true, then