#include<iostream>
#include<stdio.h>
using namespace std;
struct student //Defining structure
{
char sname[20];
int rollno;
float fee;
};
int main()
{
struct student st; //Declare st of type student
cout<<"\n Enter Student Details "<<" ";
cout<<"\n ---------------------------------\n";
cout<<" Student Name : ";
gets(st.sname);
//Accessing member of structure using member access operator (.)
cout<<" Roll Number : ";
cin>>st.rollno;
cout<<" Student Fee : ";
cin>>st.fee;
cout<<"\n\n Student Details\n"<<" ";
cout<<"---------------------------------";
cout<<"\n Student Name : "<<st.sname;
cout<<"\n Roll Number : "<<st.rollno;
cout<<"\n Student Fee : "<<st.fee;
return 0;
}