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
What do you mean by dynamic memory allocation in c? What functions are used?
What are structures and unions? State differencves between them.
Explain the priority queues?
Explain how do you print only part of a string?
What is the basic structure of c?
Is c pass by value or reference?
What is substring in c?
Where static variables are stored in memory in c?
int i[2], j; int *pi;i[0] = 1; i[1] = 5; pi = i; j = *pi + 1 + *(pi + 1)Value of j after execution of the above statements will be a) 7 b) 6 c) 4 d) pointer
What is function in c with example?
Why isnt any of this standardized in c?
Why is a semicolon (;) put at the end of every program statement?
Explain how are portions of a program disabled in demo versions?
what are the advanced features of functions a) function declaration and prototypes b) calling functions by value or by reference c) recursion d) all the above
What is quick sort in c?