C Programming Code Examples
C > Small Programs Code Examples
Extract [word]grams from textdata
String Search Algorithm & Short text sizes -
C++ program performs Naive string matching without using any specific library functions. A text and a Pattern is given as input. Pattern is searched for in a text and all 'instances' of the
Finds Greater Number of Entered Number -
Program 'takes a number' as input and finds a Greater number of the entered number using same digits. Take a number as input. Reverse the number and store it in the array. Using for
Inputs Few Numbers Performs Merge Sort -
C program, using recursion, 'Performs Merge' sort. A Merge Sort is a sorting algorithm with 'Complexity of O(nlogn)'. It is used for sorting numbers, structure, files. Perform Merge Sort
C Calculates Area of an Equilatral Triangle -
An "Equilateral Triangle" has equal sides (all 3 sides are equal). In order to calculate the area of equilateral triangle, we must know the side of the triangle. This C program would prompt
Perform Edge coloring on Complete graph -
This algorithm takes the input of the number of vertexes. Construct a complete graph for v vertex. So it assigns a color to edges without assigning the same color to 2 adjacent edges.
Count total Duplicate Elements in an array -
Code read elements in an array from user and count total number of duplicate elements in array. C program code to find all duplicate elements in an unsorted array. How to list all
Program Sample Displays Prime Numbers -
If a number passed to checkPrimeNumber() is a Prime Number, this function returns true, if not the Function returns false. If enters larger number first, 'code' will not work as intended.
Find the Frequency of Substring in Strings -
Take a string and a substring as input. Store it in the arrays 'str[] & str1[]' respectively. Using For Loop to 'compare' str1[] with the str[]. Do step2 until the end of main string. During the