This blog site is dedicated for articles on problem solving using C, C++, data structures, algorithms. Besides this few technical articles are also presented.
Mar 7, 2022
Substring in a given string
#include
#include
using namespace std;
int substrpos(char s[], char t[])
{
if(( (!s) || (!t) || strlen(s) < strlen(t)) )
return -1;
for(int i=0; i<(strlen(s)-strlen(t))+1; i++)
{
int j=0;
for(;j
No comments:
Post a Comment