Program:
#include<stdio.h>
#include<conio.h>
int main()
{
clrscr();
FILE *fp;
char c;
fp = fopen(__FILE__,"r");
do
{
c= getc(fp);
putchar(c);
}
while(c!=EOF);
fclose(fp);
getch();
return 0;
}
Output:
#include<stdio.h>
#include<conio.h>
int main()
{
clrscr();
FILE *fp;
char c;
fp = fopen(__FILE__,"r");
do
{
c= getc(fp);
putchar(c);
}
while(c!=EOF);
fclose(fp);
getch();
return 0;
}
#include<stdio.h>
#include<conio.h>
int main()
{
clrscr();
FILE *fp;
char c;
fp = fopen(__FILE__,"r");
do
{
c= getc(fp);
putchar(c);
}
while(c!=EOF);
fclose(fp);
getch();
return 0;
}
Output:
#include<stdio.h>
#include<conio.h>
int main()
{
clrscr();
FILE *fp;
char c;
fp = fopen(__FILE__,"r");
do
{
c= getc(fp);
putchar(c);
}
while(c!=EOF);
fclose(fp);
getch();
return 0;
}
No comments:
Post a Comment