All pastes #114413 Raw Edit

Stuff

public c v1 · immutable
·published 2006-08-04 01:55 UTC
rendered paste body
#include <stdio.h>#include <stdlib.h>int main(){  char *enc_string = {NULL};  int i = 0;    do  {   if(enc_string = realloc(enc_string, (i+1) * 10) == NULL)   {                 printf("Memory allocation failure!");                 return 0;   }   fgets(enc_string+(i*10),10, stdin);   i++;  } while(strchr(enc_string,"\n") != NULL);    enc_string[strcspn(enc_string, "\n")] = '\0';      printf("%s",enc_string);    printf("Press a key to continue!");  getchar();	  return 0;}