22
Dec
Program that prints itself
Related Blog Items
- Stream buffering
- Print In Reverse-Order
- Circular Doubly Linked List With Out Using Special Head or Tail Node
- Printing Binary Trees in Ascii
- Double Linked List With Out Using Special Head or Tail Node
There are many obscure ways to print a program itself, Here is an understandable program which does that…
This program output will print the program itself
int main () { int c; FILE *f = fopen (__FILE__, "r"); if (!f) return 1; for (c=fgetc(f); c!=EOF; c=fgetc(f)) putchar (c); fclose (f); return 0; }
Popularity: 7%
You need to log on to convert this article into PDF
Related Blog Items - Stream buffering
- Print In Reverse-Order
- Circular Doubly Linked List With Out Using Special Head or Tail Node
- Printing Binary Trees in Ascii
- Double Linked List With Out Using Special Head or Tail Node
Related Blog Items
- Stream buffering
- Print In Reverse-Order
- Circular Doubly Linked List With Out Using Special Head or Tail Node
- Printing Binary Trees in Ascii
- Double Linked List With Out Using Special Head or Tail Node
No Comments
No comments yet.