this is what i am trying but it aint working

fptr is a file pointer and counter is counting the number of times there is a newline.Code:while (fptr == '\n') counter++;

why is it wrong? and what would be the right code otherwise

can someone plz help

thanks