title: Can't make a way to print strings by words/or as 12 characters
body: <p>To start with, we have array of strings, I have to print this array that way, that one word before space or first 12 characters = one string.</p>
  
  <p>For example, lets say we have string "hello world qwerty------asd" , this must be printed as : </p>
  
  <pre><code>hello
  world
  qwerty------ (12 characters without space)
  asd
  </code></pre>
  
  <p>So, it will be easy to do without this 12 characters condition in the task ( just strtok function I guess ), but in this case, I dont know what to do, I have idea, but it works with only 50% of inputs, here it is, it is quite a big and very stupid, I know its about strings functions, but cant make algoritm , thank you:</p>
  
  <pre><code>    int counter = 0;// words counter
  int k1 = 0;// since I also need to print addresses of letters of third word, I have to know where 3rd word is
  int jbegin=0,// beginning and end of 3rd word
      jend=0;
  for (int k = 0; k &lt; i; k++) {
      int lastspace = 0;//last index of new string( space or 12 characters)
      for (int j = 0; j &lt; strlen(*(arr + k)); j++) {
          if (*(*(arr + k) + j) == ' ' ) {  //if space
              printf("\n");
              lastspace = j;
              counter++;
              if ( counter == 3 ) { // its only for addreses, doesnt change anything 
                  k1 = k;
                  jbegin = j + 1;
                  jend = jbegin;
              }
          }
           if (j % 12 == 0  &amp;&amp; (j-lastspace&gt;11 || lastspace==0) ) { // if 12 characters without space - make  a new string
              printf(" \n");
              counter++;
              lastspace = j;
          }
          if (counter==3 ) { 
              jend++;
          }
          printf("%c", *(*(arr+k) + j)); // printing by char
      }
      printf("\n ");
  }
  if ( jend!=0 &amp;&amp; jbegin!=0 ) {
      printf("\n Addreses of third word are :\n");
      for (int j = jbegin; j &lt; jend; j++) {
          printf("%p \n", arr + k1 + j);
          printf("%c \n", *(*(arr + k1) + j));
      }
  }
  </code></pre>