- Back to Home »
- GENERAL OR BASIC PROGRAMS , STRING PROGRAMS »
- Program to Count Blanks Spaces ,Tabs and Newlines in Given String In C
Posted by : ANIMESH SHAW
Wednesday, 2 May 2012
#include<stdio.h>
int main(void)
{
int nb,nt,nl,c;
nb=nt=nl=0;
while((c=getchar())!=EOF)
{
if(c==' ')
++nb;
if(c==' ')
++nt;
if(c==' ')
++nl;
}
printf("No. of Blanks is %d,No. of Tabs is %d and No. of Newlines is %d",nb,nt,nl);
return 0;
}

I couldn't have asked for a better blog. You happen to be always at hand to offer excellent guidance, going straight away to the point for easy understanding of your site visitors. You're really a terrific pro in this subject matter. Many thanks for being there visitors like me.
HTTP://www.KneeNeckBackPain.com/
Thanks for this post. I don’t know a large number of links to forums but my friends seem to be able to spend a lot of time on them that’s for sure.
This article provide many tips. Very useful to me. Thanks a lot ?
HTTP://www.CoolMobilePhone.net