C puzzle: Output of printf should be '5' always -


I found this puzzle in Qualification Paper.

  zero change () {write something in this function so that output of printf output should always be in the main function 5.You can not change main function}} int main () {int I = 5; Change(); I = 10; Printf ("% d", i); Return 0; }  

Any solution.?

This is a actually cheap answer:

  zero changes () {printf ("% d", 5); Exit (0); }  

: - P


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -