For NULL, include <stdlib.h>, not <stdio.h>.