write a C program to print the program itself ?!
Answer Posted / abhishek
#include <stdio.h>
static char prog[] = "#include <stdio.h>%c%cstatic char prog[] = %c%s%c;%c%cint main(void)%c{%c printf(prog, 10, 10, 34, prog, 34, 10, 10, 10, 10, 10, 10, 10);%c return 0;%c}%c";
int main(void)
{
printf(prog, 10, 10, 34, prog, 34, 10, 10, 10, 10, 10, 10, 10);
return 0;
}
Is This Answer Correct ? | 6 Yes | 6 No |
Post New Answer View All Answers
How many types of functions are there in c?
What is the purpose of scanf() and printf() functions?
What are the features of the c language?
write an algorithm to display a square matrix.
What are the advantages and disadvantages of pointers?
How to Throw some light on the splay trees?
What is the easiest sorting method to use?
What is the stack in c?
What is the difference between int main and void main?
How can I sort a linked list?
Explain two-dimensional array.
What is a MAC Address?
What is a pointer in c?
What is the function of multilevel pointer in c?
What is function what are the types of function?