Count lines in file

Share it Please
#include<stdio.h>
#include<conio.h>
main()
{
        FILE *fptr;
        int count=1,f_name[100];
        char fchar;
        clrscr();
        printf("Enter file name: ");
        scanf("%s",&f_name);
        fptr=fopen(f_name,"r");
        fchar=getc(fptr);
        while(fchar!=EOF)
        {
                if(fchar=='\n')
                {
                        count=count+1;
                }
                fchar=getc(fptr);
        }
        printf("\nTotal lines in this file %s is %d",f_name,count);
        getch();
}