Back To C++ Structures
//program to create a structure student with members (rollno,name,marks and clas) and input values from user and then display the values #include
#include
struct student { int rollno; char name[20]; int marks; int clas; }; void main() { student a; clrscr(); cout<<"enter rollno of student "; cin>>a.rollno; cout<<"enter name of student"; cin>>a.name; cout<<"enter marks of student"; cin>>a.marks; cout<<"enter class of student"; cin>>a.clas; cout<<"\nnow displaying the values\n"; cout<<"\nrollno of student is "<