# C Programming Code Examples

## C > For Loops and While Loops Code Examples

### C program to convert Octal to Binary number system

C++ Compare Binary & Sequential Search -
A 'function implementing' Binary search on a 'Sorted array'. Every time this function called, counted as a iteration of 'binary search'. So if value is "Less than Value" at start index more

C Checking the Character is Alphabet Digit -
C Programming input a character and Check whether given character is alphabet, digit or special character using if else. A character is alphabet if it in between a-z or A-Z. Character

Check if String is Empty or Not in The C++ -
You can use the 'empty()' function of string to determine whether a string is empty or not. If a string is empty, function empty() will return true otherwise false. The string class provides

Count Occurence of a Substring in a String -
Program takes a string & a substring as input and "counts the occurrence of a substring" in string. Take a String and a Substring as input. Firstly check for the substring in the string. If

C++ Coding Topological Sorting in Graphs -
Using an adjacency matrix, displays the times at which the 'different times' at which nodes are visited and left thereby producing a linear ordering of vertices in a graph. And A graph is

Program to Find Largest Element of Array -
To find the "Largest Element", the first two elements of array are checked and largest of these two element is placed in arr[0]. Then, the first and third elements are checked and

C Programs Calculates the Value of sin(x) -
C Program Coding to Calculates the Value of sin(x). It's a non-differentiable function. Start at zero, then goes up to 1, then back down to 0. But then, instead of Going Negative, it will

Program Sort Text data by rhyming order -
Create a new node. First, we handle the case where 'data' should be the first element. Apperently this !IS! the first element. Now data should [be|becomes] the first element.