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
Create a simple code fragment that will swap the values of two variables num1 and num2.
Explain indirection?
If one class contains another class as a member, in what order are the two class constructors called a) Constructor for the member class is called first b) Constructor for the member class is called second c) Only one of the constructors is called d) all of the above
Who invented bcpl language?
What is memory leak in c?
1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. The Logic should be written in Data Structures?
Explain About fork()?
How does pointer work in c?
please give me a VIRTUSA sample palcement papers.... you will only send TECHNICAL SECTION..... that is help for me Advance Thanks........................
Write an efficient algo and C code to shuffle a pack of cards.. this one was a feedback process until we came up with one with no extra storage.
What is the difference between int main and void main?
Devise a program that inputs a 3 digit number n and finds out whether the number is prime or not. Find out its factors.
What are the functions to open and close file in c language?
What is the value of h?
What is the condition that is applied with ?: Operator?