Question: C can be a cryptic language. The International Obfuscated C Code Contest pokes fun at this. Entries are to be C programs that are as

C can be a cryptic language. The International Obfuscated C Code Contest pokes fun at this. Entries are to be C programs that are as cryptic, obscure, and difficult to read as possible; but they must compile successfully (usually with warnings!) and do something.
The judges ruled that David Korns entry from the 4th International Obfuscated C Code Contest was the best one-line entry ever received up to then. Here it is:
main(){ printf(&1["\021%six\12\0"],(1)["have"]+"fun"-0x60);}
Please simplify each argument of the printf. You need to explain why the program does what it does.
Note: If you compile this program on the CSIF, you will get numerous warnings. You do not need to fix them (in fact, you should not) or explain them.
Simplify the first argument in the printf. Explain in detail your analysis.
Simplify the second argument in the printf. Explain in detail your analysis.
What does the printf print, and why?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!