title: printf shows wrong output, strange question mark at the end of line [C]
body: <p>This code trying to perform queue, but that's queue has two fields: number and word. My problem is that field "word" prints incorrectly(field "number" is fine)</p>
  
  <p>Expected output:</p>
  
  <p>22
  abc</p>
  
  <p>12
  efg</p>
  
  <p>654
  xyz</p>
  
  <p>Unfortunately output looks like this</p>
  
  <p><a href="https://ibb.co/gjF446F" rel="nofollow noreferrer">https://ibb.co/gjF446F</a></p>
  
  <pre><code>#include &lt;stdio.h&gt; 
  #include &lt;stdlib.h&gt; 
  #include &lt;limits.h&gt;
  #include &lt;string.h&gt; 
  
  #define MAX_capacity 1000
  #define Max_len_napis 100
  
  
  typedef struct{
     int number;
     char word[];
  
  } data;
  
  data intArray[MAX_capacity];
  int peak = 0;
  int rear = -1;
  int itemCount = 0;
  
  int front() {
     return intArray[peak].number;
  }
  
  bool isEmpty() {
     return itemCount == 0;
  }
  
  bool isFull() {
     return itemCount == MAX_capacity;
  }
  
  int size() {
     return itemCount;
  }  
  
  void insert(data x) {
  
     if(!isFull()) {
  
        if(rear == MAX_capacity-1) { 
           rear = -1;            
        }       
  
        int indeks = ++rear;
        intArray[indeks].number = x.number;
        strcpy (intArray[indeks].word, x.word);
  
        itemCount++;
     }
  }
  
  
  data remove() {
     data dat = intArray[peak++];
  
     if(peak == MAX_capacity) {
        peak = 0;
     }
  
     itemCount--;
     return dat;  
  }
  
  
  void print(int N){
  
  
      for(int i=0;i&lt;N;i++){
          data n = remove();           
        printf("%d\n",n.number);
        printf("%s\n",n.word); // that's line doesn't work correctly
  
  
  
  
      }
  
  
  
  }
  
  
  int main() {
     data tab[3];
  
     tab[0].number = 22;
     strcpy (tab[0].word, "abc");
     insert(tab[0]);
  
     tab[1].number = 12;
     strcpy (tab[1].word, "efg");
     insert(tab[1]);
  
     tab[2].number = 654;
     strcpy (tab[2].word, "xyz");
     insert(tab[2]);
  
  
  
     int siz = size();
     print(siz);
  
  
  
  
  
      return 0;
  
  
  
     }
  </code></pre>
  
  <p>I think that printf("%s\n",n.word) is not work correctly. But if I dont use struct, all works properly. </p>