Reading A Program or File


            #include<stdio.h>
            
            main()
            {
                FILE *fp;
                char ch;
                clrscr();
                fp = fopen("any.txt", "rt");
                
                while(!feof(fp))
                {
                    ch = fgetc(fp);
                    printf("%c", ch);
                }
                getch();
            }
        

Output: