fork download
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. reverse(char out[1024])
  5. {
  6. int i,j;
  7. i = 0;
  8.  
  9.  
  10. printf("Podaj slowo, ktorej chcesz odwrocic\n");
  11. scanf("%s",out);
  12. j = strlen(out);
  13.  
  14. while (out[i]!=out[j])
  15. {
  16. out[i]=out[j];
  17. ++i;
  18. --j;
  19. printf("%c",&out[j]);
  20.  
  21. }
  22.  
  23. printf("Nowe slowo to %s",out);
  24. }
  25.  
  26.  
  27. int main(void)
  28. {
  29. char out[1024];
  30. reverse(out);
  31.  
  32.  
  33.  
  34. return 0;
  35. getchar();
  36.  
  37. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:1: error: illegal character: \35
#include <stdio.h>
^
Main.java:1: error: class, interface, or enum expected
#include <stdio.h>
         ^
Main.java:2: error: illegal character: \35
#include <string.h>
^
Main.java:7: error: class, interface, or enum expected
	i = 0; 
	^
Main.java:10: error: class, interface, or enum expected
	printf("Podaj slowo, ktorej chcesz odwrocic\n");
	^
Main.java:11: error: class, interface, or enum expected
	scanf("%s",out);
	^
Main.java:12: error: class, interface, or enum expected
	j = strlen(out);
	^
Main.java:14: error: class, interface, or enum expected
		while (out[i]!=out[j]) 
		^
Main.java:17: error: class, interface, or enum expected
		++i;
		^
Main.java:18: error: class, interface, or enum expected
		--j;
		^
Main.java:19: error: class, interface, or enum expected
		printf("%c",&out[j]);
		^
Main.java:21: error: class, interface, or enum expected
	} 
	^
Main.java:24: error: class, interface, or enum expected
}
^
Main.java:30: error: class, interface, or enum expected
	reverse(out);
	^
Main.java:34: error: class, interface, or enum expected
	return 0;
	^
Main.java:35: error: class, interface, or enum expected
	getchar();
	^
Main.java:37: error: class, interface, or enum expected
}
^
17 errors
stdout
Standard output is empty