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
Can a variable be both static and volatile in c?
Is python a c language?
What does the characters “r” and “w” mean when writing programs that will make use of files?
What is return type in c?
write a program to create a sparse matrix using dynamic memory allocation.
What is unary operator?
What is the value of c?
What is structure in c language?
C language questions for civil engineering
What is c programing language?
What are different types of operators?
What is the argument of a function in c?
What is the difference between volatile and const volatile?
What are the c keywords?
Explain how can I convert a number to a string?