Pergunta de entrevista da empresa Qualcomm

static variables

Resposta da entrevista

Sigiloso

6 de jul. de 2013

static variables are stored in the data segment (as opposed to the stack). They are primarily used in functions that are called multiple times. In this situation a static variable is itialized one time and each call to the function would update the same variable. Thus the static variable is shared by all calls to this function.