Write a preprocessor command that uses the Predefined Macros __DATE__, __TIME__, __LINE__, and __FILE__.


Difficulty level
This exercise is mostly suitable for students
printf( "Program %s: (%d) Error opening file ", __FILE__, __LINE__ );
// Program MYPROG.C: (32) Error opening file  useful for debugging

Back to the list of exercises
Looking for a more challenging exercise, try this one !!
Statically implemented Binary Tree