That happens because you read the whole of the strings to the same buffer and, when presenting the results, you show only the first 3 characters of it. Maybe you intended to use an array of buffers. Something like:
char name[3][20];
int x;
for(x=0;x<3;x++)
{
cout<<"Enter Student "<<x+1<<" Name:";
cin.getline(name[x],20);
}
cout<<"Enter Name Detail."<<endl;
for(x=0;x<3;x++)
{
cout<<name[x];
}
system("pause");