Pergunta de entrevista da empresa Tesla

find the error in a a simple squaring function whose argument is a volatile pointer to an integer.

Resposta da entrevista

Sigiloso

4 de jan. de 2016

volatile pointer is not safe, it should be a volatile const pointer. long long int tesla_func_squared(volatile * const int ptr) { //code; }

5