Home Forums C Programming C program to display own source code as output Re: C program to display own source code as output

#3276
Priyanka Rajput
Participant

MYFILE.CPP

#include
void main()
{
FILE  *fp;
fp=fopen("myfile.cpp","r");
char ch;
while((ch=getchar(fp))!=EOF)
putchar(ch);
}