I\'m trying to figure out how user input can be used as a filename in C. Here\'s the simple program I wrote.
#include #define MAX 100 int main()
here's a function that you'll have to add after the fgets to slove this problem
void newlineRemover(char *array) { int i , lenght ; lenght = strlen(array); for(i = 0 ; i < lenght ; i++) { if(array[i] == '\n') array[i] = '\0' ; } }