Domanda di colloquio di Tesla

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

Risposta di colloquio

Anonimo

4 gen 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