Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #define BLOCK ((1 << 14) * sizeof(char))
- main()
- {
- FILE* file;
- char* text, temp;
- char mtr[13][80], tmp[80];
- int nelem=0;
- int i=0, j=0, k=0,n=0;
- /* qua apro file */
- text = (char *)malloc(BLOCK * sizeof(char));
- i = 0;
- while((nelem = fread(text + i * BLOCK, BLOCK, sizeof(char), &file)) == BLOCK)
- text=(char *)realloc(text, ++i * BLOCK * text);
- text[i * BLOCK + nelem] = '\0';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement