#include <limits> // you will need this
#include <iostream>
#include <cstring>
usingnamespace std;
int main()
{
// BTW, better to keep arrays, initializations, and non-arrays all separate
int id[10][8] = {0};
int year[10][1] = {0};
int x;
char command;
char name[10][26] = {'\0'};
char pg[10][6] = {'\0'};
cout << "Enter the student ID:";
cin >> id[0][8];
cin.ignore( numeric_limits <streamsize> ::max(), '\n' ); // get rid of that pesky Enter key
cout << "Enter the student Name:";
cin.getline(name[0], 26 , '\n'); // getline() automatically looses the Enter key
cout << "Enter the programme:";
cin.getline(pg[0], 6 , '\n');
cout << "Enter the year:";
cin >> year[0][1];
cin.ignore( numeric_limits <streamsize> ::max(), '\n' ); // again, for below
cout << id[0][8] << name[0][26] << pg[0][6] << year[0][1] << endl;
// Please don't use system("PAUSE") if you can avoid it.
cout << "Press ENTER to continue..." << flush;
cin.ignore( numeric_limits <streamsize> ::max(), '\n' );
return 0; // I like EXIT_SUCCESS too... but you should #include <cstdlib> to use it
}