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

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

1141


How many types of operators are there in c?

1020


write a c program to calculate sum of digits till it reduces to a single digit using recursion

3292


What is the difference between struct and union in C?

1294


Why structure is used in c?

1175


How can I implement a delay, or time a users response, with sub-second resolution?

1060


What is c language used for?

967


What does main () mean in c?

1086


What is structure packing in c?

1065


What is identifiers in c with examples?

1155


C program execution always begins with a) #include b) comment (/*-------*/) c) main() d) declaration instructions

1043


Do you know null pointer?

1011


Which is better malloc or calloc?

1090


What is c language & why it is used?

1096


Explain about the constants which help in debugging?

1356