write a C program to print the program itself ?!
Answer Posted / moumita chatterjee
#include<stdio.h>
#include<conio.h>
int main()
{
FILE *fp;
char c;
fp=fopen("G:\\selfpro.c","r");
if(fp==NULL)
{
puts("File can open");
exit(1);
}
while(1)
{
c=fgetc(fp);
if(c==EOF)
break;
else
printf("%c",c);
}
getch();
return 0;
}
Is This Answer Correct ? | 0 Yes | 4 No |
Post New Answer View All Answers
Whats s or c mean?
What does sizeof int return?
How do you use a pointer to a function?
Is it better to bitshift a value than to multiply by 2?
What is call by value in c?
Explain what are preprocessor directives?
What is register variable in c language?
Write a program to generate the Fibinocci Series
What is ctrl c called?
What does == mean in texting?
what is the height of tree if leaf node is at level 3. please explain
Can the sizeof operator be used to tell the size of an array passed to a function?
What are qualifiers?
Explain argument and its types.
Q.1 write a program to create binary tree 1 to 16 numbers? Q.2 write a program to creat a binary search tree for the member that is given by user?