All pastes #834960 Raw Edit

Someone

public c v1 · immutable
#834960 ·published 2007-12-28 16:36 UTC
rendered paste body
#include<stdio.h>#include<string.h>int contain(char str_long[],char str_short[]){	int index=0,index2=0;   int counter=0,counter2=0;			while(str_long[index2]!='/0')	 {		   if (str_long[index2]==str_short[index])     		   {			       if (str_long[index2]==str_short[index])					   {				        index++;				        index2++;			            counter++;					   }					    else					    counter=0;					   					     if (counter==strlen(str_short))										{							counter2++;   					            index=0; 						 }						  continue;				 }				 		   else{			   index++;			   index2++;               if (str_short[index]=='/0')		           index=0;		          }		}				return counter2;}	void main(){		char  str_short1[5]={"abc"};	char str_long1[20]={"abcweryttaretabc"}; 	  printf("%d",contain(str_long1,str_short1));}