before gets i have to input a number using scanf. After giving the value of scanf when i press enter it reads it as a string in gets i dont want that i want to give the value of string in the next line
i tried getchar after scanf but it didnt solve my problem.
small part of my code
is there a way that gets read only my string and not newline characters