Explanation:
The variable i is a block level variable and the visibility is inside that block only. But the lifetime of i is lifetime of the function so it lives upto the exit of main function. Since the i is still allocated space, *j prints the value stored in i since j points i.
Peter Vegas
Leave a Reply
Get the latest updates on your inbox
Be the first to receive the latest updates from Codesdoc by signing up to our email subscription.