write a C program to print the program itself ?!
Answer Posted / swamy
#include<stdio.h>
#include<conio.h>
int main()
{
FILE * fp = NULL;
char c = '\0';
fp = fopen(__FILE__,"r");
while(!feof(fp))
{
c = fgetc(fp);
printf("%c",c);
}
getch();
}
| Is This Answer Correct ? | 4 Yes | 5 No |
Post New Answer View All Answers
why use "return" statement a) on executing the return statement it immediately transfers the control back to the calling program b) it returns the value present in the parentheses return, to the calling program c) a & b d) none of the above
which of the following statement is wrong a) mes=123.56; b) con='T'*'A'; c) this='T'*20; d) 3+a=b;
Can a pointer be volatile in c?
What is const volatile variable in c?
What are actual arguments?
Write a function that will take in a phone number and output all possible alphabetical combinations
What is scope rule of function in c?
how to capitalise first letter of each word in a given string?
Is there a way to jump out of a function or functions?
What is a 'null pointer assignment' error?
How can I invoke another program (a standalone executable, or an operating system command) from within a c program?
given post order,in order construct the corresponding binary tree
Is fortran faster than c?
What does %c do in c?
What are reserved words?