Compare whether the first n bytes of strings S1 and S2 are equal

From , 5 Years ago, written in C, viewed 191 times.
URL https://pastebin.vip/view/169779d3
  1. #include <syslib.h>
  2. #include <string.h>
  3.  
  4. main()
  5. {
  6.         char *s1="Golden Global View";
  7.         char *s2="Golden global view";;
  8.  
  9.         clrscr();        // clear screen
  10.         if ( !bcmp ( s1,s2,7 ) )
  11.                 printf ( "s1 equal to s2 in first 7 bytes" );
  12.         else
  13.                 printf ( "s1 not equal to s2 in first 7 bytes" );
  14.  
  15.         getchar();
  16.         clrscr();
  17.         if ( !bcmp ( s1,s2,12 ) )
  18.                 printf ( "s1 equal to s2 in first 12 bytes" );
  19.         else
  20.                 printf ( "s1 not equal to s2 in first 12 bytes" );
  21.  
  22.         getchar();
  23.         return 0;
  24. }
  25.  

Reply to "Compare whether the first n bytes of strings S1 and S2 are equal"

Here you can reply to the paste above

captcha

https://burned.cc - Burn After Reading Website