How to get the number of the current file name in C

1 Answer

0 votes
#include <stdio.h>

void f() {
   printf("File :%s\n", __FILE__);
}

int main()
{
   f();
   
   return 0;
}  
  
     
 
/*
run:
       
File :C:/.../test/test-project/main.c
  
*/

 



answered Jul 3, 2020 by avibootz

Related questions

1 answer 154 views
1 answer 135 views
1 answer 143 views
1 answer 124 views
2 answers 201 views
1 answer 117 views
...