Advertisement
Guest User

Untitled

a guest
Nov 18th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.22 KB | None | 0 0
  1.     while ((len = _read(file, &buffer, 4096)))
  2.     {
  3.         if (i == 1)
  4.             output = malloc(sizeof(char) * 4096 + 2);
  5.         else
  6.             output = realloc(output, sizeof(char) * (4096 * i) + i);
  7.         strcpy(output, buffer, len);
  8.         i++;
  9.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement