when i try to open a file for example c:\file.txt it will not open. here is my code.
it always comes back "NOT OPEN". why is this?Code:int main () { char c; /* User defined character */ char filename[50]; int num = 0; /* Number of times character was found */ FILE *inp; /* pointer to input file */ printf("Enter the name of the file you wish to open: "); scanf ("%s", &filename); inp = fopen("c:%s", "r"); if (inp != NULL){ printf("OPEN"); }else{ printf("NOT OPEN"); } getch(); return 0; }