YouTip LogoYouTip

C Examples Source Code Output

# C Example - Output the Source Code of the Current File [![Image 3: C Examples](#) C Examples](#) Output the source code of the current file. `__FILE__` is a constant representing the currently executing file. ## Example #includeint main(){FILE *fp; char c; fp = fopen( __FILE__ ,"r"); do{c = getc(fp); putchar(c); }while(c != EOF); fclose(fp); return 0; } The output is: #include int main() { FILE *fp; char c; fp = fopen( __FILE__ ,"r"); do { c = getc(fp); putchar(c); } while(c != EOF); fclose(fp); return 0;} [![Image 4: C Examples](#) C Examples](#)
← Python3 Func ExecC Examples Complex Number Add β†’