 # C Programming Code Examples

## C > Strings Code Examples

### program to replace first occurrence of a character in a string

Sum of Natural numbers using While loop - Find the sum of natural numbers using While Loop. When you use while loop, you have to initialize the loop counter variable before the Loop & Increment or Decrement it inside the

Find Armstrong number in C++ Language - In math, A number in which the sum of cube of its individual digits is equal to the number itself is called Armstrong number. 1^3 + 5^3 + 3^3 = 153. To make logic firstly concept about

Code Print Binary Equivalent of an Integer - Print "binary equivalent" of an integer. C code using recursion, finds the binary equivalent of a "Decimal Number". Decimal numbers are of base 10 while "Binary Numbers" are of base 2

Simple Programs Area Of Square Formula - The second power was described in terms of the area of a square, as in the above formula. It led to the use of the term square to mean raising to the "second power". Thus the area

Sample Sort Strings in Alphabetical Order - To sort strings in alphabetical order, you have to ask to the user to enter the two string, now start comparing the strings, and if found then make a t variable of same type, and place the

Finds Factorial of a Number use Recursion - Program Find the Factorial of a number using 'recursion'. C Program prints the factorial of a number using recursion. 'Factorial' is product of all the number from 1 to the user specified

Convert Binary Number Octal Vice-Versa - You will learn to convert "binary number" to octal, and octal number to binary manually by creating a "user-defined" function. In this, first convert the binary number to "decimal".

Program Find the Length of the Linked list - C Program to Find the length of the linked list using Recursion. This program uses Recursive Function and calculates the length of a string. The user enters a string to find it's length. List