main()
{
int c,nc,ns,nl,nt;
nc = ns = nl = nt = 0;
while ((c = getchar()) != EOF)// takes prompts for input till press Ctrl + D
{
++nc; // counts no of characters
if (c == '\n') nl++;// counts no of lines
if (c == ' ') ns++;// counts no of spaces
if (c == '\t') nt++;// counts no of tab spaces
}
printf("\nNo Of Characters = %d\nNo Of Lines = %d\nNo Of Spaces = %d\nNo Of tab Spaces = %d\n",nc,nl,ns,nt);
}