Tuesday, February 10, 2015

Print Source Code

/* Write a program that prints its own code as the output */ #include<stdio.h> int main() { FILE *fp; char c; fp = fopen(__FILE__,"r"); do{ c= getc(fp); putchar(c); } while(c != EOF); fclose(fp); getch(); return 0; }

Share

& Comment

0 comments:

Post a Comment

 

Copyright © 2015 Code Fervor™ is a registered trademark.

Designed by Templateism By Naman Kumar