Pagini recente » Cod sursa (job #1287208) | Cod sursa (job #1147782) | Cod sursa (job #2448457) | Cod sursa (job #516922) | Cod sursa (job #1349678)
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
int main(void){
freopen("convertor.in", "r", stdin);
freopen("convertor.out", "w", stdout);
int cap = 1024;
int cont = 0;
char text[1024 * 10128];
char buffer[1024];
while(gets(buffer)){
// cont = cont + strlen(buffer) + 1;
// if(cont >= cap){
// cap = cap * 2;
// text = (char*)realloc(text, cap * sizeof(char));
// }
strcat(text, buffer);
}
char *token;
token = strtok(text, "}");
while(token != NULL){
printf("%s\n", token);
token = strtok(0, "}");
}
// printf("%s", text);
return 0;
}