The compiler is just fine. You are confusing a char[] with a char *. They are NOT the same thing (try printing their sizeofs, for example). P.S. "lint" would have caught this. P.P.S. You shouldn't print a (char *) with an int format specifier unless you cast the (char *) to an int. "lint" will NOT catch this, although "Safe C" is supposed to.