2_StringMatch
2_StringMatch
a. Read a main String (STR), a Pattern String (PAT) and a Replace String (REP)
b. Perform Pattern Matching Operation: Find and Replace all occurrences of PAT in STR with
REP if PAT exists in STR. Report suitable messages in case PAT does not exist in STR
Support the program with functions for each of the above operations. Don't use Built-in functions.
*/
// Header files
#include <stdio.h>
//Prototype
int StringMatch(char [], char [], char [], char []);
//Main function
int main()
{
char s[MAX]={0}, p[MAX]={0}, r[MAX]={0}, final[MAX]={0};
int found;
/*
OUTPUT:
*/