void reg() {
char name[60];
char city[1000];
puts("Name");
scanf("%s", name);
puts("City?");
scanf("%s", city);
FILE *fptr = fopen("./src/details.txt", "a");
fputs(strncat(strncat(name, " ", 61), city, 1061), fptr);
fclose(fptr);
}
When I call this function (present in another file) from main, it doesn't execute (program runs without any output). In fact, any function with scanf in my file doesn't execute. However, functions without scanf work fine. Could anyone tell me what's wrong?