HCLTech Interview Question

What's the difference between static variables in a function and a file?