Skip to content

Instantly share code, notes, and snippets.

@kylelk
Last active December 22, 2015 02:08
Show Gist options
  • Select an option

  • Save kylelk/6400976 to your computer and use it in GitHub Desktop.

Select an option

Save kylelk/6400976 to your computer and use it in GitHub Desktop.
/* The file name of this C program should be sourcecode.c */
#include<stdio.h>
int main(){
FILE *fp;
char c;
fp = fopen("sourcecode.c","r");
do{
c= getc(fp);
putchar(c);
}
while(c!=EOF);
fclose(fp);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment