Example for __file__ and __line__ in c:
What is the output of below c program?
printf("%d %s",__LINE__, __FILE__);
compile time error.
5 and name of the file with path.
3 and name of the file with path.
none of the above are true.
5 and name of the file with path. comments and spaces are also counted for line numbers. This is one way of printing your code's LINE number and FILE name.
Back To Top