SubhanUllah Posted October 13, 2022 Report Posted October 13, 2022 Check the block, in which the variable is declared. When the block ends, the scope ends, and the variable is not valid any more. Example: if (1) { int a; // scope starts if (1) { } // scope ends }
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now