Introducing Radical.sh

Forget Code launches a powerful code generator for building API's

rewind - Moves the file position pointer back to the start in C

#include <stdio.h>
  #include <stdlib.h>

  int main(int argc, char *argv[])
  {
    FILE *fp;

    if((fp=fopen("test", "r"))==NULL) {
      printf("Cannot open file.\n");
      exit(1);
    }

    while(!feof(fp)){
        putchar(getc(fp));
    }
    rewind(fp);


    while(!feof(fp)){
        putchar(getc(fp));
    }
    fclose(fp);
  }