Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #define VELIKOST 8000000
- // const int VELIKOST 100000;
- int main(int argc, char** argv) {
- static char* pole[VELIKOST]; // static umožní větší velikost, je uložený v paměti globálních proměnných
- char buffer[256];
- int i = 0;
- while(scanf("%255s", buffer)!=EOF && i < VELIKOST) {
- int delka = strlen(buffer);
- if(delka > 1) {
- char* novy = malloc(delka+1);
- strcpy(novy, buffer);
- pole[i++] = novy;
- }
- if ( (i & (4*65536-1)) == 0)
- printf("Precten %d. radek\n", i);
- }
- int N = i;
- for(i = 0; i < N; i++)
- puts(pole[i]);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement