65. Pointer-iii

Question.1

A function returns a pointer to a local variable:

int* get_config() {
   int timeout = 500;
   return &timeout;
}

int *cfg = get_config();
printf("%d", *cfg);

What happens?

Need Help? Refer to the Quick Guide below

Select Answer

Restart quiz!