Back To C++ Pointers
//program to create a pointer to a structure variable #include
#include
struct student { int rollno; char name[20]; int marks; }; void main() { clrscr(); student *s; cout<<"\nenter rollno of student "; cin>>s->rollno; cout<<"\nenter name of student "; cin>>s->name; cout<<"\nenter marks of student "; cin>>s->marks; cout<<"\nrollno of student is "<
rollno; cout<<"\nname of student is "<
name; cout<<"\nmarks of student are "<
marks; getch(); }