Guest User

Untitled

a guest
May 30th, 2016
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <stdlib.h>
  4. #include "realezat.h"
  5. int main (void)
  6. {
  7. int i;
  8. FILE *out;
  9. int *stu;
  10. char *cru;
  11. out=fopen("output.txt", "w+");
  12. stu=(int*)malloc(sizeof(int)*1);
  13. stu[0]=0;
  14.  
  15. cru=(char*)malloc(sizeof(char)*1);
  16.  
  17. if(reshift("input.txt", 1, cru, stu)!=0)
  18. {
  19.  
  20. for(i=0; i<stu[0]; i++)
  21. {
  22. fprintf(out, "%c", cru[i]);
  23. }
  24. free(cru);
  25. free(stu);
  26. fclose(out);
  27. return 0;
  28. }
  29. fclose(out);
  30. free(cru);
  31. free(stu);
  32.  
  33. return -1;
  34. }
  35. ~
Advertisement
Add Comment
Please, Sign In to add comment