fork(1) download
  1. #include<stdio.h>
  2. #include<string.h>
  3.  
  4. int main()
  5. {
  6. char tab[1000],tab2[1000];
  7. int ile,n=0,i,l=0;
  8.  
  9.  
  10. scanf("%1000[0-9a-zA-Z ]",tab);
  11. n=strlen(tab);
  12.  
  13. l=n;
  14. for(i=0; i<l; i++)
  15. { // 1 2 3 (5)
  16. tab2[n-1]=tab[i]; // 0 1 2
  17. //
  18. n--;
  19. }
  20. tab2[l]='\0';
  21. printf("12 23 34 45 1234567890 <----wejście ;-)\n");
  22. printf("%s <--------- twoj out\n",tab2);
  23. printf("1234567890 45 34 23 12 <----prawidłowo: ;-)\n");
  24.  
  25. }
  26.  
  27.  
Success #stdin #stdout 0s 2172KB
stdin
12 23 34 45 1234567890
stdout
12 23 34 45 1234567890 <----wejście ;-)
0987654321 54 43 32 21 <--------- twoj out
1234567890 45 34 23 12 <----prawidłowo: ;-)