write a C program to print the program itself ?!
Answer Posted / mobashyr
#include<stdio.h>
#include<conio.h>
int main()
{
FILE *fin;
char c;
fin=fopen("prntsrccode.c","r");
if(fin==NULL)
{
printf("Error Opening file in read mode");
exit(1);
}
do
{
c=fgetc(fin);
fputchar(c);
}while(c!=EOF);
fclose(fin);
getch();
return 0;
}
| Is This Answer Correct ? | 3 Yes | 7 No |
Post New Answer View All Answers
How many types of functions are there in c?
What are structural members?
If null and 0 are equivalent as null pointer constants, which should I use?
Why c is called object oriented language?
What is dynamic variable in c?
a formula,a series of steps,or well defined set of rules for solving a problem a) algorithem b) program c) erdiagram d) compiler
what is the syallabus of computer science students in group- 1?
What are types of preprocessor in c?
Explain how does flowchart help in writing a program?
How do we print only part of a string in c?
2) Write a program that will help Air Traffic Control for an airport to view the sequence of flights ready for take-off. The airport can accommodate 10 flights waiting for take-off at any point in time. Each flight has a unique 3 digit numeric identifier. Each time a flight takes-off, Air Traffic Control adds a flight to the waitlist. Each time a flight is added to the waitlist, the list of flights waiting to take-off must be displayed. When a flight is cleared for take-off, Air Traffic Control removes the flight from the waitlist. Each time a flight takes-off, the list of flights waiting to take-off must be displayed. Sequence of take-off is the sequence of addition to the waitlist
Explain what is the heap?
Write a c program to build a heap method using Pointer to function and pointer to structure ?
Is a house a mass structure?
What is sizeof in c?