i needed to write a prog to display which line a character is found in, in a text file

so basically my problem is checking for the new line or end of line

i mean
if(ch=='\n')
line++;

doesnt work

someone tells me cr(ascii val = 13) and lf(ascii val = 10)
are the chars to check for
what would be the syntax if i need to check
one char from file as equal to 2 ascii values
can anyone give me the syntax of that one if statement to check for end of line

be a help