 # C Programming Code Examples

## C > For Loops and While Loops Code Examples

### convert Decimal to Hexadecimal number system

Sum of Natural Numbers using Recursion - C Program find the sum of Natural Numbers using recursion. The 'Positive Numbers' 1, 2, 3... are known as natural numbers. Program below takes a positive integer from the user

C++ Programs Performing Uniform Binary - Implement to binary search on a sorted array. For the mid index value of any of a 'Subarray', instead of calculating refer Lookup Table. It is an improvement in 'Binary Search' since table

Inheritance Allow Child Classes to Acquire - A class that inherits another class is known as child class, it is also known as derived class or subclass. What is parent class? The class that is "being inherited" by other class is known as

C++ Program to Find Factorial of Number - First think what is the factorial of a number? How 'mathematically' it can be calculated. If you got this info then it will be very easier to make a C++ code logic to find the "Factorial".

C Swap 2 Numbers using Bitwise Operator - Swap two number using bitwise operator in C programming. There are tons of discussions going around the internet to swap 2 numbers without using temporary variable. We can...

Implementing Circular Doubly Linked List - 'Memory allocated' for node dynamically and inserts element at beginning. Inserts elemnet at last. Inserts element at position and delete node at particular position. Update value of a

Implement Pancake Sort Array of Integers - C code implements Pancake Sort on array of integers. Pancake sorting is a variation of the "Sorting Problem" in which the only allowed operation is to reverse the elements of some

Generate Perfect Numbers in given Range - C Program Code to print all Perfect Numbers between 1 to n. A Perfect number is a positive integer which is equal to the sum of its proper positive divisors. Input upper limit from user