title: display the first letter of every word in a string having spaces
body: <p>I am trying to display the first letter of every word in this C program. However, it is not recognizing the spaces in my given input. I'm printing a line inside the if statement as a debugging measure. However, that line is not being executed. It is only outputting the first element of the input. Thanks in advance! </p>
  
  <pre><code>#include&lt;stdio.h&gt;
  #include&lt;stdlib.h&gt;
  #include&lt;string.h&gt;
  
  void stringg(char s[],int size)
  {
          int i=1;
          char r[size];
          r[0]=s[0];
          int j;
          for(j=0;j&lt;size;j++)
          {
  
                  if(s[j]==' ')
                  {
                          printf("Space Test \n");
                          r[i]=s[j+1];
                          i++;
                  }
          }
          r[i]='\0';
          printf("\n The Returned String is %s",&amp;r);
          return;
  }
  int main()
  {
          char ss[100];
          scanf("%s",&amp;ss);
          int size;
          size=sizeof(ss)/sizeof(ss[0]);
          stringg(ss,size);
          return 0;
  }
  </code></pre>