#include<iostream>
using namespace std;
struct Student
{
char name[20];
int id;
float marks;
};
void display(Student s1)
{
cout<<s1.name<<" "<<s1.id<<" "<<" "<<s1.marks<<endl;
}
Student getdata(Student s1)
{
s1.marks=75;
return s1;
}
int main()
{
Student s1,*ptr;
ptr=&s1;
cin.get(s1.name,20);
cin>>(*ptr).id>>ptr->marks; //s1.marks == (*ptr).marks==ptr->marks are same
display(s1);
s1=getdata(s1);
display(s1);
return 0;
}
I2luY2x1ZGU8aW9zdHJlYW0+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgpzdHJ1Y3QgU3R1ZGVudAp7CiAgICBjaGFyIG5hbWVbMjBdOwogICAgaW50IGlkOwogICAgZmxvYXQgbWFya3M7Cn07CnZvaWQgZGlzcGxheShTdHVkZW50IHMxKQp7CiAgICBjb3V0PDxzMS5uYW1lPDwiICI8PHMxLmlkPDwiICI8PCIgIjw8czEubWFya3M8PGVuZGw7Cn0KU3R1ZGVudCBnZXRkYXRhKFN0dWRlbnQgczEpCnsKICAgIHMxLm1hcmtzPTc1OwogICAgcmV0dXJuIHMxOwp9CgppbnQgbWFpbigpCnsKICAgIFN0dWRlbnQgczEsKnB0cjsKICAgIHB0cj0mczE7CiAgICBjaW4uZ2V0KHMxLm5hbWUsMjApOwogICAgY2luPj4oKnB0cikuaWQ+PnB0ci0+bWFya3M7ICAgLy9zMS5tYXJrcyA9PSAoKnB0cikubWFya3M9PXB0ci0+bWFya3MgYXJlIHNhbWUKICAgIGRpc3BsYXkoczEpOwogICAgczE9Z2V0ZGF0YShzMSk7CiAgICBkaXNwbGF5KHMxKTsKICAgIAogICAgcmV0dXJuIDA7Cn0=