fork download
  1. /* Write a program which converts upper case to lower case or lower case to
  2. upper case depending on the name it is involved with as found in argv[0] */
  3.  
  4. #include<stdio.h>
  5. #include<string.h>
  6. #include<ctype.h>
  7.  
  8. /* lower: converts upper case to lower case */
  9. /* upper: converts lower case to upper case */
  10.  
  11. int main(int argc,char *argv[])
  12. {
  13. int c;
  14.  
  15. if(strcmp(argv[0],"./lower")==0)
  16. while((c=getchar()) != EOF)
  17. else
  18. while((c=getchar()) != EOF)
  19.  
  20. return 0;
  21. }
  22.  
  23.  
Success #stdin #stdout 0s 5312KB
stdin
Standard input is empty
stdout
Standard output is empty