I was asked these 2 questions during an interview. I guess the address of a static variable will be the same no matter where it is declared. It will also have the same address from run to run. Correct me if I am wrong.
If a static variable is declared out side of a function, will the memory address be the same as if it's declared in a function?
If a static variable is declared out side of a function, will it have the same address every time you run the program?