This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Saritha, At line 3, you set myArray = 1. Then, at line 4, you call the function modifyIt(). Because you're passing it an array, you actually modify the array itself. So, modifyIt adds 1 to myArray which now equals 2. It doesn't matter here whether you use value++ or ++value[0}. Then control returns to the main function. Line 5 is now executed - and the value 5 is printed out. And the program is finished. Hope this helps, Kathy