Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

hi

Name: Anonymous 2009-03-14 12:45

(begin
  (display "Hello World") (newline)
)

Name: Anonymous 2009-03-14 15:30


#include <stdio.h>

char *getLineR(FILE *in_stream, char *line, int n)
{
  char c = fgetc(in_stream);
  if (c != '\n') {
    line = getLineR(in_stream, line, n + 1);
  }
  else {
    line = malloc((n+2)*sizeof(char));
    if (line == NULL) exit(1);
    line[(n+1)] = '\0';
  }
  line[n] = c;
  return line;
}

int main()
{
  char c, *line;
  printf("Hi.");

  line = getLineR(stdin, NULL, 0);
  while (strcmp(line, "bye") != 0) {
    printf("I know you said \"%s\", but no you're a faggot.\n", line);
    line = getLineR(stdin, NULL, 0);
  }
  printf("Bye, faggot\n\n");
  return 0;
}

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List