Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Explain how do you convert strings to numbers in c?

1039


Why can arithmetic operations not be performed on void pointers?

1002


Write a program to swap two numbers without using third variable?

1259


write a program fibonacci series and palindrome program in c

994


Why is c called c?

979


How many bytes are occupied by near, far and huge pointers (dos)?

1131


Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?

971


What is c language used for?

943


How to write c functions that modify head pointer of a linked list?

955


Write a c program to build a heap method using Pointer to function and pointer to structure ?

4643


In C language, a variable name cannot contain?

1240


How do I use strcmp?

1034


main() { inta=10,b=20; a>=5?b=100:b=200; printf("%d ",b); }

1478


which is an algorithm for sorting in a growing Lexicographic order

1760


Stimulate calculator using Switch-case-default statement for two numbers

2936