fork download
  1.  
  2. #include <stdio.h>
  3. #include <string.h>
  4. main()
  5. {
  6. int i,j,c;
  7. char a[10];
  8. scanf("%c",a);
  9. for(i=0;j=strlen(a)-1;i<=j;i++;j--)
  10. {
  11. char c = a[i];
  12. a[i] = a[j];
  13. a[j] = c;
  14. return 0;
  15. }
  16. }
  17.  
Compilation error #stdin compilation error #stdout 0s 9432KB
stdin
sathiesh
compilation info
prog.c:4:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
 main()
 ^~~~
prog.c: In function ‘main’:
prog.c:9:2: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
  for(i=0;j=strlen(a)-1;i<=j;i++;j--)
  ^~~
prog.c:9:25: warning: statement with no effect [-Wunused-value]
  for(i=0;j=strlen(a)-1;i<=j;i++;j--)
                        ~^~~
prog.c:9:28: error: expected ‘)’ before ‘;’ token
  for(i=0;j=strlen(a)-1;i<=j;i++;j--)
                            ^
prog.c:6:10: warning: unused variable ‘c’ [-Wunused-variable]
  int i,j,c;
          ^
stdout
Standard output is empty