Scope of variable

Sir if we are using local x inside main x=10 and even we a using it inside for loop (int x=1;x<5;x++) and we we are printing this x outside the loop ,so its value should be 5 as we are doing in other programs but in scope it is showing 10 i am not able to understand why current value is not displaying , why it is printing outside one value , sir plz tell me why value x value is not changing after coming out of loop

Hey @anuragavm123
Welcome to the Coding Blocks family buddy
Can you send the code once so I can better understand your query and answer it
Thanks