Skip to content

Instantly share code, notes, and snippets.

@axgle
Created November 4, 2009 05:57
Show Gist options
  • Save axgle/225826 to your computer and use it in GitHub Desktop.
Save axgle/225826 to your computer and use it in GitHub Desktop.
#include <stdio.h>
int main(){
char s[255];
int n;
FILE *fp;
fp=fopen(__FILE__,"r");
n=0;
while( fgets(s,255,fp) ) {
n++;
printf("%d %s",n,s);
}
fclose(fp);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment