write a C program to print the program itself ?!
Answer Posted / vinay tiwari
this can be achieved by file handling
#include<stdio.h>
void main()
{
FILE *fp;
char ch;
clrscr();
fp=fopen("file.c","r");
ch=getc(fp);
while(ch!=EOF)
{
putchar(ch);
ch=getc(fp);
}
getch();
}
| Is This Answer Correct ? | 63 Yes | 33 No |
Post New Answer View All Answers
how to capitalise first letter of each word in a given string?
What is the significance of an algorithm to C programming?
Explain how can you check to see whether a symbol is defined?
What is the difference between formatted&unformatted i/o functions?
Who developed c language?
What are the keywords in c?
What is the use of gets and puts?
Why is this loop always executing once?
Can we declare variable anywhere in c?
Why c is a procedural language?
What is structure data type in c?
Explain how do you print only part of a string?
Is there a way to switch on strings?
How can you determine the size of an allocated portion of memory?
What are pragmas and what are they good for?