Advertisement
LuckyCipher

strcmp1.c

Jan 30th, 2020
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.20 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<string.h>
  3. int main()
  4. {
  5.     char a[] = "ant";
  6.     char b[] = "bat";
  7.    
  8.     if(strcmp(a,b) < 0) {
  9.         printf("%s %s",a,b);
  10.     }else{
  11.         printf("%s %s",b,a);
  12.     }  
  13.    
  14.    
  15.     return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement