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
Explain how do you convert strings to numbers in c?
Why can arithmetic operations not be performed on void pointers?
Write a program to swap two numbers without using third variable?
write a program fibonacci series and palindrome program in c
Why is c called c?
How many bytes are occupied by near, far and huge pointers (dos)?
Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?
What is c language used for?
How to write c functions that modify head pointer of a linked list?
Write a c program to build a heap method using Pointer to function and pointer to structure ?
In C language, a variable name cannot contain?
How do I use strcmp?
main() { inta=10,b=20; a>=5?b=100:b=200; printf("%d ",b); }
which is an algorithm for sorting in a growing Lexicographic order
Stimulate calculator using Switch-case-default statement for two numbers