Q. Difference between global and static variable?

Love and Share

Answers : Static variables persist throughout the scope, but the lifespan is not throughout the program. Global variables persist throughout the scope of base blocks of memory that is their lifespan is throughout the program.

Love and Share

Leave a Reply

Your email address will not be published. Required fields are marked *