home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a120 / 1.ddi / WATCOM_C / WAT123.C < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-08  |  735 b   |  27 lines

  1. /*------------------------------------------------------------------*/
  2. /* ╡{ªí└╔ªW║┘: wat123.c                                             */
  3. /*------------------------------------------------------------------*/
  4. #include <stdio.h>
  5. #include <string.h>
  6.  
  7. void main()
  8. {
  9.    char *s1 = "CCC";
  10.    char *s2 = "CCE";
  11.    char *s3 = "CCF";
  12.  
  13.    int status;
  14.  
  15.    status = memcmp(s2, s1, strlen(s2));
  16.    if (status > 0)
  17.       printf("╜w╜─░╧ 2--%s ñj⌐≤ ╜w╜─░╧ 1--%s\n",s2,s1);
  18.    else
  19.       printf("╜w╜─░╧ 2--%s ñp⌐≤ ╜w╜─░╧ 1--%s\n",s2,s1);
  20.  
  21.    status = memcmp(s2, s3, strlen(s2));
  22.    if (status > 0)
  23.       printf("╜w╜─░╧ 2--%s ñj⌐≤ ╜w╜─░╧ 3--%s\n",s2,s3);
  24.    else
  25.       printf("╜w╜─░╧ 2--%s ñp⌐≤ ╜w╜─░╧ 3--%s\n",s2,s3);
  26. }
  27.