Pergunta de entrevista da empresa HP Inc.

Difference between global local static variable

Resposta da entrevista

Sigiloso

9 de abr. de 2023

Global variable can be accessed i.e, has scope throughout program and life time is till program terminated. local variable has scope within function and lifetime till function call returns . static variable has scope within function but lifetime till program terminates