64. Pointer-ii

Question.1

A driver reads a sensor value through a pointer. If the sensor is offline, the pointer is NULL:

int *sensor_val = get_sensor_ptr();
int reading = *sensor_val + offset;

What happens if get_sensor_ptr() returns NULL?

Need Help? Refer to the Quick Guide below

Select Answer

Restart quiz!