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
Why do we use pointer to pointer in c?
Is c still used?
Explain c preprocessor?
Which of these functions is safer to use : fgets(), gets()? Why?
Where in memory are my variables stored?
application attempts to perform an operation?
What is sizeof array?
Why c is a procedural language?
Why is structure important for a child?
Can we access array using pointer in c language?
Explain what is #line used for?
to print the salary of an employee according to follwing calculation: Allowances:HRA-20% of BASIC,DA-45% of BASIC,TA-10%. Deductions:EPF-8% of BASIC,LIC-Rs.200/-Prof.Tax:Rs.200/- create c language program?
Why c is a mother language?
hai iam working in sap sd module for one year and working in lumax ind ltd in desp department but my problem is i have done m.b.a in hr/marketing and working sap sd there is any combination it. can you give right solution of my problem. and what can i do?
What are the benefits of c language?