How do you write a program which produces its own source
code as its output?
Answer Posted / abhinav gupta
Try to google....quine Problem...
one solution is
main(){char *c="main(){char
*c=%c%s%c;printf(c,34,c,34);}";printf(c,34,c,34);}
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
why use functions a) writing functions avoids rewriting the same code over and over b) using functions it becomes easier to write programs and keep track of what they are doing c) a & b d) none of the above
How many types of operators are there in c?
write a c program to calculate sum of digits till it reduces to a single digit using recursion
What is the difference between struct and union in C?
Why structure is used in c?
How can I implement a delay, or time a users response, with sub-second resolution?
What is c language used for?
What does main () mean in c?
What is structure packing in c?
What is identifiers in c with examples?
C program execution always begins with a) #include b) comment (/*-------*/) c) main() d) declaration instructions
Do you know null pointer?
Which is better malloc or calloc?
What is c language & why it is used?
Explain about the constants which help in debugging?