Getting the Source File Name and Line Number using __FILE__ and __LINE__ compiler constants in C/C++

C/C++ compilers provide two pre-defined ‘constants’ that return the current source file name and the line number of current statement. So it is useful to locate the error when …