title: Count all characters in string but spaces
body: <p>How can I count sum of characters in string excluding blank spaces?! I wrote a code but it counts blank spaces too. Any suggestions? here is what I have:</p>
  
  <pre><code>void main()
  {
  char str[100];
  int len, space;
  
  printf( "Enter string:\n ");
  printf("\n");
  gets(str);
  
  len = strlen(str);
  
  printf("\n");
  printf("\n No.of characters in string is %d " , len );
  
  getch();
  }
  </code></pre>