VOOZH about

URL: https://www.geeksforgeeks.org/c/a-c-puzzle-2/

⇱ A C Puzzle - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

A C Puzzle

Last Updated : 21 Jun, 2018
What code to write in place of "// your code" so that the below code prints 20. Output:
20 
We strongly recommend you to minimize your browser and try this yourself first This question seems to be a trick question, as it is not possible to update local variable in a function without sending it, we can't make value of 'a' as 20 but for outputting 20 we can write function f as below -
2 will be printed by f() and 0 will be printed by a Thanks to Utkarsh Trivedi for suggesting above solution.
Comment
Article Tags:
Article Tags: