HCLTech interview question

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