HP Inc. interview question

Memory allocation of static vs local variables