C Program to Implement Kadane’s Algorithm

This is a C Program to Implement Kadane Algorithm. Kadane algorithm is to used to obtain the maximum subarray sum from an array of integers. Here is source code of the C Program to Implement Kadane’s Algorithm. The C program is successfully compiled and run on a Linux system. The program output is also shown … Read more

advertisement

C Program to Implement Knuth-Morris-Pratt Algorithm for Pattern Searching

This is a C Program to implement KMP algorithm for string matching. Unlike the Naive algorithm where we slide the pattern by one, we use a value from lps[] to decide the next sliding position. Let us see how we do that. When we compare pat[j] with txt[i] and see a mismatch, we know that … Read more

advertisement

C Program to Implement Levenshtein Distance Computing Algorithm

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 the Monoalphabetic Cipher

This is a C Program to implement Monoalphabetic Cipher. This program performs encryption and decryption using a monoalphabetic cipher. Only alphabetic characters are encrypted and case is ignored. Input is from stdin; Output is to stdout; Error is to stderr. One command line parameter is required of the form -dkey or -ekey where -e specifies … Read more

advertisement

C Program to Find the Longest Increasing Subsequence

This is a C Program to find length Longest Commmon Subsequence of a given sequence. LCS Problem Statement: Given two sequences, find the length of longest subsequence present in both of them. A subsequence is a sequence that appears in the same relative order, but not necessarily contiguous. For example, “abc”, “abg”, “bdf”, “aeg”, ‘”acefg”, … Read more

advertisement

C Program to Implement Grep, Egrep and Fgrep Commands

This is a C Program to implment gerp linux command. Grep is a command-line utility that searches a plain text that matches a regular expression. Here is source code of the C Program to Implement the Program Used in grep/egrep/fgrep. The C program is successfully compiled and run on a Linux system. The program output … Read more

advertisement

C Program to Implement the Hill Cypher

This is a C Program to implement Hill Cipher. Hill cipher is a polygraphic substitution cipher based on linear algebra. Here is source code of the C Program to Implement the Hill Cypher. The C program is successfully compiled and run on a Linux system. The program output is also shown below. #include<stdio.h>#include<string.h>int main() { … Read more

advertisement

C Program to Encrypt Message using Playfair Cipher

This is a C Program to implement Playfair cipher. The Playfair cipher is a digraph substitution cipher. It employs a table where one letter of the alphabet is omitted, and the letters are arranged in a 5×5 grid. Typically, the J is removed from the alphabet and an I takes its place in the text … Read more

advertisement

C Program to Implement Caesar Cipher

Caesar Cipher Program in C: The Caesar Cipher technique is the simplest and oldest method of encryption technique in cryptography. In this technique, we are given a text which we have to encrypt by shifting the characters by some fixed number of positions. For example, if the shift position is 2 then every character will … Read more

advertisement

Checksum Program in C

Checksum Program in C: Checksum is an error detection mechanism that detects the error in the data/message in a data communication from sender to receiver. It is only an error detection mechanism and hence cannot correct the errors in the message bits. It uses Checksum generator on the sender side and Checksum checker on the … 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.