

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Pro actical No. Dote: G//
Am: Write o prognam or Patfenn Motchicg
5oftuaoe Requiod ova Online Cormpile
include<stdio.h>
break
int main ) chan xt AABAACAADAABAAA BAA": Chon po+ AABA 5onth pat, t x t et unn O
Patlenn found a ndex O Poenn found at index 9 Paltenn (^) found ot (^) ndex (^13)
cASSMAte Date:6I22Page: Pracico No. 1
Aim: WNeite a pnogeam fon Pateno Matchiag-
50fHuuaoe Requioed Tava Onliae Compilen.
Pnoqeam Code iecudecstdio.b includesstníag.h vaid scancb^ (^ chan^ pot^ chan^ *fxt.
int ME Stnlea Cpat), int N=6tnlen(txt fon Lint i=o i=N-M:it tatS fon i0, jkM,jt) iiftxtri+ i1=pat )
priatECCPatiro ound at index od \n D
iat main) char *xtAABAACAADAARAAA BAA
SeanchLpattxt peuna
Output: Patlena ound at iodex o
Patkennfound ot iodtx Patten aunol atedex 13 Conclu6lan Pa no Matchinq lets uo angaoize the cad as metehin9 patlenns tbeexecukd when the