A C program that prints itself. Click for Solution |
-
Warning: Illegal string offset 'name' in /home/prepdo6/gpl4you/discussquessub.php on line 681
A #include<stdio.h>
#include<conio.h>
void main()
{
char c;
FILE *fp;
clrscr();
fp=fopen("d:\\abhi\\holeprg.cpp","r+");
do
{
c=(char)fgetc(fp);
putchar(c);
} while(c!=EOF);
getch();
printf("I AM INDIAN");
}
// NOTE:- U MUST REFER TO YOUR PROGRAM WHICH U R TYPING 'in the absolute path ' mentioned above
Warning: Illegal string offset 'name' in /home/prepdo6/gpl4you/discussquessub.php on line 681
A void main() { FILE *fp; char ch; fp=fopen(_FILE_,r); while(1) { ch=fgetc(fp); if(ch==EOF) break; else printf("%c",ch); } fclose(fp); }
Explore
- GPL4you
- Home
- Prepdoor - Online Mock Test
- About
- FAQs
- Contact
- Contact Us
© 2011 - gpl4you | All Rights Reserved.