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

Wt are the Buses in C Language

2753


What is a stream water?

662


What is an example of structure?

591


What is getch c?

860


What is the 'named constructor idiom'?

645






What is the difference between strcpy() and memcpy() function in c programming?

629


WHAT IS THE DEFINATION OF IN TECHNOLOGY AND OFF TECHNOLOGY ?

1862


Synonymous with pointer array a) character array b) ragged array c) multiple array d) none

622


What is the modulus operator?

742


which of the following shows the correct hierarchy of arithmetic operations in C a) (), **, * or/,+ or - b) (),**,*,/,+,- c) (),**,/,*,+,- d) (),/ or *,- or +

1190


using for loop sum 2 number of any 4 digit number in c language

1738


Explain high-order bytes.

678


Why can’t constant values be used to define an array’s initial size?

840


What oops means?

588


What are 3 types of structures?

596