beingtopper.jkp@gmail.com
+91-8700702530
Free Demo

Being Topper

  • About Us
  • Knowledge Base
  • Modules
  • Branches
    • Ajmer
    • Tilak Nagar
    • Noida
    • Chandigarh
    • Mumbai
  • Contact Us

Being Topper

  • About Us
  • Knowledge Base
  • Modules
  • Branches
    • Ajmer
    • Tilak Nagar
    • Noida
    • Chandigarh
    • Mumbai
  • Contact Us
  • About Us
  • Knowledge Base
  • Modules
  • Branches
    • Ajmer
    • Tilak Nagar
    • Noida
    • Chandigarh
    • Mumbai
  • Contact Us

Being Topper

  • About Us
  • Knowledge Base
  • Modules
  • Branches
    • Ajmer
    • Tilak Nagar
    • Noida
    • Chandigarh
    • Mumbai
  • Contact Us
Algorithm Design and analysis ProgramsB.tech notesBCA NOTESC++ programInformation technology

c++ program to perform naive string matching

Being Topper 25/05/2013 0 Comments

WRITE A PROGRAM TO PERFORM NAÏVE STRING MATCHING

#include<iostream.h>
#include<conio.h>
#include<string.h>

void main()
{
clrscr();
intn,m,s;
char t[50], p[50];
cout<<"Enter text"<<endl;
cin>>t;
cout<<"Enter pattern"<<endl;
cin>>p;
m=strlen(p);
n=strlen(t);
for(s=0;s<=(n-m);s++)
{
for(int i=0;i<=m;i++)
{
if(t[s+i]!=p[i])
break;
}
if(i=m)
cout<<"Valid Shift"<<endl;
cout<<"shift is"<<s;
}
getch();
}

OUTPUT :

 

C++ programs for the implementation of Breadth First Search ...

Output-for-activity-breadth -first-search

Algorithm and design analysis b.tech information technology notes c++ program to perform naive string matching c++ programs naive string matching WRITE A PROGRAM TO PERFORM NAÏVE STRING MATCHING
AboutBeing Topper
In Socials:
Prevc++ program to perform breadth first search25/05/2013
VBScript Full Program for structure | Structure in VBScript18/01/2014Next

Related Posts

BCA NOTESVB.Net progrmas

WAP to demonstrate Polymorphism in Vb.net through Method Overloading

 Demonstratation of  Polymorphism in Vb.net through Method Overloading : code begins...

Being Topper 17/10/2014
BCA NOTESInformation technologyPrograms/AlgorithmVB.Net progrmas

Demonstrate Polymorphism in Vb.net through Constructor overloading.

Que : WAP to demonstrate Polymorphism in Vb.net through Constructor overloading....

Being Topper 17/10/2014
Categories
Recent Posts
  • Best Email Marketing Software and Services
  • How to Apply Adsense on YouTube
  • Complete Guide to Writing a Newsletter !
  • Benefits of Creating Email List for small Businesses | Digital Marketing
  • Create Account or Get Email Alerts When New Employees Join a Company

Copyright © 2021 Being Topper ® . All Rights Reserved