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
Explain about block scope in c?
Create a structure to specify data on students as given below: Roll number, Name, Department, Course, and Year of joining. Assume that there are not more than 450 students in the collage. (a) Write a function to print the names of all students who joined in the last 3 years. (b) Write a function to print the data of a student whose roll numbers are divisible by 4.
What is a null pointer in c?
Why void is used in c?
1. Write a function to display the sum of two numbers in the following ways: By using (i) pass by value (ii) pass by address a. function with argument and with return value b. function with argument and without return value c. without argument , with return value d. without argument , without return value Note: Use pass by address.
What is the value of uninitialized variable in c?
What are the types of pointers?
Here is a neat trick for checking whether two strings are equal
Can a local variable be volatile in c?
How many types of errors are there in c language? Explain
What is the use of typedef in c?
What is the size of a union variable?
How are 16- and 32-bit numbers stored?
What do you understand by normalization of pointers?
What are categories used for in c?