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;
}

3 Responses so far.

  1. Anonymous says:

    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/

  2. Anonymous says:

    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.

  3. Anonymous says:

    This article provide many tips. Very useful to me. Thanks a lot ?
    HTTP://www.CoolMobilePhone.net

Popular Post

Blog Archive

Total Pageviews

Sign In

Follow by Email

Powered by Blogger.

Like Us on Facebook

Search This Blog

Loading...

Indian Coder

- Copyright © Programming Mania -Metrominimalist- Powered by Blogger - Designed by Johanes Djogan -