how to remove \n from a string c
snippet in c

how to remove \n from a string c

user7626

str[strcspn(str, "\n")] = 0;