The elements in your student structure are all character variables of length 10, so they will only be able to hold a single item that is no longer than 9 characters. But your code does the following:
cin >> subject[j];
which will read a single character and store it at the jth character position of that array. You need to change those items to
std::string
types in order to capture multiple values.