title: How to separate words from a sentence (only using character arrays and no built-in c++ functions)?
body: <p>I wrote this code to separate words from a sentence. I have to use character arrays(no strings) and can't use any built-in function(restricted by instructor). This does not work .</p>
  
  <pre><code>#include&lt;iostream&gt;
  using namespace std;
  int main()
  {
    char sentence[100]={'\0'}, word[100]={'\0'};
    cin.getline(sentence,100);
    for(int i = 0; sentence[i] != 32 || sentence[i] != '\0'; i++)
    { 
      word[i]=sentence[i];
    }
    cout &lt;&lt; word;
  }
  </code></pre>