title: program calculates how many printable characters are in an array of characters that entered by user
body: <p>I am getting the wrong results. I am not sure what is causing the problem. The task is to calculate the number of printable characters inside an array of characters given by user-input. The output <code>r</code> always equals 0 (zero) no matter what input is given. </p>
  
  <pre><code>printf("Geben sie bitte einen Zeichenkette ein \n");
  fgets(s1, sizeof(s1), stdin);   
  int r=0;
  int size = sizeof(s1)/sizeof(s1[0]);    
  for (i=0;i&lt;=size;i++){
      char a=s1[i];
      int h = (int)a;
      if (isprint(h)==1){
          r=r++;
      }
  }
  printf("%d\n",r);
  return 0;
  </code></pre>