My Code is : https://ide.codingblocks.com/s/212344
When I declare the bool array inside the main function, the code does not work. Why is it so ?
My Code is : https://ide.codingblocks.com/s/212344
When I declare the bool array inside the main function, the code does not work. Why is it so ?
@aryanrathee
Hello Aryan,when we declare array inside any function then memory for array is allocated on stack
but when we declare it global then memory for array is allocated on data segment.
datasegment memory capacity is higher then the stack thats why ur code is not working when u are declaring it in main function and working when declare it global.