Question d’entretien chez Tesla

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

Réponse à la question d'entretien

Utilisateur anonyme

4 janv. 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