Home »
C programs »
C preprocessors programs
C Preprocess Directive: __LINE__ Macro
By IncludeHelp Last updated : March 10, 2024
C __LINE__ Macro
The __LINE__ is an inbuilt Macro in C programming language, it returns current line number of the code.
__LINE__ Macro Example
#include <stdio.h>
int main(){
printf("Hello world\n");
printf("Line: %d\n",__LINE__);
printf("How are you?\n");
printf("Line: %d\n",__LINE__);
printf("Bye bye!!!\n");
return 0;
}
Output
Hello world
Line: 6
How are you?
Line: 8
Bye bye!!!
C Preprocessors Programs »