Problem ?
1. Given Two strings str1 and str2, Find out whether str2 is substring of str1 ?
2. Initailize the value of str1 and str2 in below given section.
Initialize
Enter Strings
Step Execution
main(){
 char str1[100], str2[100];
 int i, j, k;
 scanf( "%s%s", str1, str2 );
 i = 0; j = 0; k = 0;
 while ( str1[i] != 0 ){
   j = 0; k = i;
   while ( str2[j] != 0 && str1[k] != 0 ){
     if ( str2[j] != str1[k] ){
       break;
     }
     j++; k++;
   }
   if ( str2[j] == 0 ){
     printf("String str2 is found in str1.");
     break;
   }
   i++;
 }
}
Code Output
Memory Map Of Str1:
/0
Memory Map Of Str2:
/0
OUTPUT : 
LOCAL VARIABLE: