I could not see my text file at my files

I could not see my text file at my files when I tried to write my code with

#include <stdlib.h>

int main(void){
    
    FILE *file;
    char name[]="watch";
    dosya=fopen("watch.txt" , "w");
    fprintf(file, "This file made for %s.",name);
    
    fclose(file);
    
    
}

Where can I find my text file.

You'll have to specify the path to the file. When you are running in the Xcode debugger, you may be able to specify that in the scheme settings somewhere.

Normally these kinds of simple apps are designed to be compiled and run from the command line. In this case "watch.txt" would be located in the current working directory of wherever your Terminal shell happened to be using at that time.

I could not see my text file at my files
 
 
Q