#include<stdio.h>
#include<conio.h>
#include<process.h>
void main()
{
 FILE *fp;
 char  ch; int noc=0,nob=0,not=0,nol=0;
 clrscr();
 fp=fopen("interpol.cpp", "r");
 if(fp==NULL)
 {
  printf("\n Error opening source");
  exit(0);
 }
 while((ch=getc(fp))!=EOF)
 {noc++;
  if(ch==' ') nob++;
  if(ch=='\n') nol++;
  if(ch=='\t') not++;
 }

 fclose(fp);
 printf("\nNo. of characters=%d\nNo. of lines=%d",noc,nol);
 printf("\nNo. of tabs=%d\nNo. of blanks=%d", not,nob);
 getch();
}
