Please help me on this C++ program on array of objects? :     #include<iostream.h>
    #include<conio.h>
    class XIIB
    {
    char name[30];
    int age;
    int roll;
    float marks;

    public:
    void getdata(char a[30],int i,int j,float k)
    {
    name[30]=a[30];
    age=i;
    roll=j;
    marks=k;
    }
    void putdata(void)
    {
    cout<<"Name:"<<name<<endl;
    cout<<"Age:"<<age<<endl;
    cout<<"Roll:"<<roll<<endl;
    cout<<"Marks:"<<marks<<endl;
    }
    };
    const int size=5;
    XIIB student[size];
    void main()
    {
    char x[30];
    int ag;
    int rno;
    float mrks;
     for(int p=0;p<size;p++)
     {
     cout<<"Enter Name,Age,Roll and Marks of Student"<<p+1<<endl;
     cin>>x>>ag>>rno>>mrks;
     student[p].getdata(x,ag,rno,mrks);
     }
     for(p=0;p<size;p++)
     {
     cout<<"Student"<<p+1<<endl;
     student[p].putdata();
     }
     getch();
     } 

This program compiles without any error.Also takes the input for Name,Roll No,Age and Marks as expected but it is unable to display the name of the Students.I seem to have made some error in the getdata or putdata functions.Please help me in producing the output as expected.Thanks