C Program to Perform Naive String Matching

This is a C Program to perform string matching using Naive String Matching. A text and a pattern is given as input. The pattern is searched for in the text and all instances of the pattern are given as output. Here is source code of the C Program to Perform Naive String Matching. The C … Read more

advertisement

C Program to Perform String Matching Using String Library

This is a C Program to perform string matching using String Library. A text and a pattern is given as input. The pattern is searched for in the text and all instances of the pattern are given as output. Here is source code of the C Program to Perform String Matching Using String Library. The … Read more

advertisement

C Program to Implement the RSA Algorithm

The RSA algorithm is a very fast algorithm for encryption and decryption. It is used in many applications like encryption and decryption of messages. The algorithm is based on the idea that if we know the public and private keys, then we can encrypt and decrypt messages. An RSA user creates two large prime numbers, … Read more

advertisement

C Program to Repeatedly Search the Same Text

This is a C Program to search a string repeatitively. Given a text txt[0..n-1] and a pattern pat[0..m-1], write a function search(char pat[], char txt[]) that prints all occurrences of pat[] in txt[]. You may assume that n > m. Here is source code of the C Program to Repeatedly Search the Same Text (such … Read more

advertisement

C Program to Implement Rabin-Karp Method for Pattern Searching

This is a C Program to implement RabinKarp method. Given a text txt[0..n-1] and a pattern pat[0..m-1], write a function search(char pat[], char txt[]) that prints all occurrences of pat[] in txt[]. You may assume that n > m. Examples: 1) Input: txt[] = “THIS IS A TEST TEXT” pat[] = “TEST” Output: Pattern found … Read more

advertisement

C Program to Implement Wagner and Fisher Algorithm for Online String Matching

This is a C Program to implement online search. The Wagner–Fischer algorithm is a dynamic programming algorithm that measures the Levenshtein distance between two strings of characters. For example, the Levenshtein distance between “kitten” and “sitting” is 3, since the following three edits change one into the other, and there is no way to do … Read more

advertisement

C Program to Implement String Search Algorithm for Short Text Sizes

This is a C Program to perform string matching without using any specific library functions. A text and a pattern is given as input. The pattern is searched for in the text and all instances of the pattern are given as output. Here is source code of the C Program to Implement the String Search … Read more

advertisement

C Program to Perform Cryptography using Transposition Technique

This is a C Program to implement transposition technique. A transposition cipher is a method of encryption, where the positions held by plaintext characters or group of characters are shifted as per a system, such that ciphertext is a permutation of the plaintext. That means only the order of the character or group of characters … Read more

advertisement

C Program to Implement the Vigenere Cipher

This is a C Program to implement Vigenere Cipher. Implement a Vigenère cypher, both encryption and decryption. The program should handle keys and text of unequal length, and should capitalize everything and discard non-alphabetic characters. If your program handles non-alphabetic characters in another way, make a note of it. Here is source code of the … Read more

advertisement

C Program to Implement Boyer-Moore Algorithm for Pattern Searching

This is a C Program to implement Boyer-Moore algorithm. The Boyer-Moore algorithm is considered as the most efficient string-matching algorithm in usual applications. A simplified version of it or the entire algorithm is often implemented in text editors for the search and substitute commands. The algorithm scans the characters of the pattern from right to … Read more

advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.