I have tried using the following code to pass a char into a string and to open a .txt file so i can read it's content. I have no idea why and how can i utilize this fopen to actually read test.txt
int main(){
char input[60];
char a;
FILE *file;
printf("Hello!\n");
enter code here
printf("Pelase input a file name in .txt format: \n");
gets(input);
printf("%s",input);
printf("\n");
**file = fopen("%c,input","rt");**
// file = fopen("%s",input) <-- Doesnt work
// file = fopen("%s",input,rt) <-- Error
if (file){
while((a=fgetc(file))!=EOF){
printf("%c",a);
}
fclose(file);
}
}