printing a file in c : I am trying to print a file in my program but I am not sure where I am going wrong.
I could be using fscanf incorrectly which is very possible. T

I need to print the unsolved puzzle to see if I'm getting the file into my code correctly but like a said Im not sure if I'm even useing fscanf right.(the puzzle file is in my clion file to I know that not the problem.)
Here is what I have for my reading part of the program.
        
    int read(const char *name, int **problem, int **z, int 
        *size) {
        int n;
     int *p;
        int *c;
        FILE* input;
      
        input= fopen("name","r");
        fscanf(input,"%d",&n);
        
       *size=n;
       p=(int *)malloc(n*n*sizeof(int)); /* nxn grid has n*n elements*/
       c= (int*)malloc (n*n*sizeof(int));
       *problem=p;
       *z=c;
        
    
       input=fopen(name,"r");
       fprintf(input,"%d\n",n);
       fclose(input);
            return 0 ;
    
        }
       

All I need to know is where I have gone wrong or if my problem isn't with this.