employer cover photo
employer logo
employer logo

Checkpoint Systems

Is this your company?

Checkpoint Systems interview question

If two tasks call the same function, what needs to be done to the code first? Conditions: no static variables in the function, only stack variables.

Interview Answer

Anonymous

15 Oct 2019

Easy. Nothing, since each task has it's own stack. However, the interviewer said I was wrong, I stood my ground, politely and explained: "each thread or task has its own stack and no shared memory." Was he testing my resolve? Anyway, he was wrong. He was looking for me to use the "reentrant" keyword, hardly even used anymore.