Monday, 2 December 2013

Program to Print itself

Language C.
Program name: printitself.c

CODE:

#include<stdio.h>
 int main()
 {
  FILE *file;
  char ch;
  file = fopen("printitself.c","r");
  while(( ch = fgetc(file) ) != EOF)
  {
  fputc(ch,stdout);
}
  fclose(file);
  return 0;
 }

No comments:

Post a Comment