wordCount() is ruining the string for later processing. Always remember that strtok() modifies the string by writing '\0' at appropriate places. What about merging the two tasks of counting words and saving them to the array?
#include <iostream>
#include <cstring>
using namespace std;
namespace
{
const int MAX = 100;
const int LEN = 100;
const char* fmt = ".,? ;";
}
int main()
{
char strWords[MAX][LEN];
char str[LEN];
cout << "Enter a string: ";
cin.getline(str, LEN);
int count = 0;
for (char *p = strtok(str, fmt); count < MAX && p; p = strtok(0, fmt))
{
strcpy(strWords[count++], p);
}
cout << "No of words = " << count << endl;
for (int i = 0; i < count; i++)
{
cout << strWords[i] << endl;
}
}