C Programming Code Examples
C > Strings Code Examples
search all occurrences of a word in given string
Program Finds Sum of Digits of a Number -
Logic to find sum of digits of a given number in C programming. The main idea to find sum of digits can be divided in three steps. Extract last digit of the given number. Add extracted
C++ Describe the Representation of graph -
Takes the input of the 'number of vertex'. For each pair of vertex ask user whether they are connected or not. Print the adjacency matrix. A function to print the adjacency matrix. And
Prints the Sum of all Odd Numbers in C++ -
The digit sum of a given integer is the sum of all its digits (digit sum of '84001' is calculated as 8+4+0+0+1 = 13). Odd number is an integer which is not a multiple of two. If it is "divided"
C++ Searching Using Self-Organizing Lists -
"Self-Organizing" List updates on the basis of 'last searched item'. The sequential searching approach is used. In general search, 80% time only specific 20% of data is accessed. Sample
Generate a Sequence of N Characters for a -
This algorithm takes the input of the 'specific' sequence. It generates random Subsequence from the given character string. A function to generate 'random' sequence of a given length
Program Reverse Order of Words in String -
Logic to reverse the order of words in a given string. There are many Logic's to Reverse the order of words. Here is the simplest approach I am using to Reverse the order. Input a string
Implement Randomized Binary search tree -
Program demonstrates the implementation of Randomized Binary Search Tree. Function to check if tree is empty. And then make the tree logically empty. Functions to insert data.
C++ Checking if a Given Graph is Bipartite -
Bipartite Graph is a graph in which the set of 'vertices' can be divided into 2 sets such that all vertex should be present in either set 1 or set 2 but not both, and there should no edge