SHARE
TWEET

Untitled

a guest Nov 9th, 2019 89 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main (void)
  5. {
  6.     char str1[1024]="";
  7.     scanf("%30s", str1);
  8.     char str2[1024]="";
  9.     scanf("%30s", str2);
  10.     char str3[1024]="";
  11.  
  12.  
  13.     if (strcmp (str1, str2)==0)
  14.         printf("0\n");
  15.     else
  16.         printf ("1\n");
  17.  
  18.     strcpy (str3, str1);
  19.     printf("%s\n", str3);
  20.     int a = '5';
  21.     char * ach =strrchr(str3, a);
  22.     printf ("%d \n",(ach-str3+1));
  23.     printf("%d", strspn(str1,str2));
  24.     return 0;
  25.     return 0;
  26. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top