# C Programming Code Examples

## C > Strings Code Examples

### program to remove spaces, blanks from a string

C++ Code Find Smallest Element in Arrays -
Enter the array size and array elements, now start finding for the "smallest element" in the array to display the smallest element of the array as shown here in C++ sample program.

Converts Octal Number to Binary Number -
To convert octal number to binary number in C++, you have to ask to the user to enter the octal number to convert it to binary number to display the "equivalent value" in binary as

C++ Program Displays Factors of Number -
Find all 'factors' of an integer using for loop & if statement. Takes a positive integer from an user & displays all the factors of that number. In this program, an integer entered by user is

Find the volume & surface area of cuboids -
This C Program to calculates the volume and surface area of cuboids. The Formula used in this program are surfacerea= 2(w * l + l * h + h * w) where w is Width & l is Length and h is

C++ Language & One Time Pad Algorithm -
C++ program encodes any message using the technique of 'One time' pad cipher technique. Input is not Case Sensitive and works only for all characters. 'White Spaces' are not ignored

Print the Factorial of Number by recursion -
Program takes a Positive integer & Calculates the factorial of the number. First user enter 6 then, Factorial will be equal to '1*2*3*4*5*6' 720. Learn to Find the "Factorial" of a number

C++ Describe the Representation of graph -
This algorithm represents a given graph using 'Adjacency List'. This method of representing graphs isn't efficient. The time complexity of this algorithm is O(v*e). Print the 'adjacency'

C Program Code Performing Binary Search -
C program, Using Recursion, performs binary search. In this C program, an array of random number is generated. User is asked to enter a key. The array of random numbers are sorted