Though this problem seems complex, the concept behind this program is straightforward; display the content from the same file you are writing the source code.

In C programming, there is a predefined macro named __FILE__ that gives the name of the current input file.

#include <stdio.h> int main() { // location the current input file. printf("%s",__FILE__); }

C program to display its own source code