Store Information and Display it Using Structure
Output
Enter information: Enter name: Jack Enter roll number: 23 Enter marks: 34.5 Displaying Information: Name: Jack Roll number: 23 Marks: 34.5
In this program, a structure student is created. The structure has three members: name (string), roll (integer) and marks (float).
Then, a structure variable s is created to store information and display it on the screen.