display source code as output in c program | CTechnotips



#include<stdio.h>
int main(){
    FILE *p;
    char ch;
    p=fopen("filedemo.c","r");
    while((ch=getc(p))!=-1)
         putchar(ch);
    fclose(p);
    return 0;
}

0 comments:

Post a Comment