Posts

Showing posts with the label c string programs

Find common characters in two string

Simple C program to find and print common characters in two strings. This program will find common character and will print them. This program will print common characters with frequency of character that are present in both strings.

Count Common characters in two strings

Given two strings, count total number of common characters. For example if two strings are "coder" and "side" then common characters are 2 ( 'd' and 'e' ). If strings are "Programming" and "Side" then common character is 'i'. If strings are "aabbcc" and "aabcc" then common characters are 5 ( 2'a', 1'b', 2'c' ).