Perhaps I'm being a bit sarcastic, but could it be that the reason experienced C programmers often use if ((fp = fopen("file", "r")) == NULL) ... is that the compiler will complain if you write if ((fp = fopen("file", "r")) = NULL) ... whereas it won't complain about fp = fopen("file", "r"); if (fp = NULL) ... ???