struct assignment - CS2073 Assignment Store Information of Students Using Structure Usage of Functions and Arrays Structure is a group of variables

struct assignment - CS2073 Assignment Store Information...

This preview shows page 1 - 2 out of 3 pages.

CS2073 Assignment Store Information of Students Using Structure Usage of Functions and Arrays Structure is a group of variables of different data types represented by a single name. Lets say we need to store the data of students like student name, roll-number, marks and age etc. One way of doing this would be creating a different variable for each attribute, however when you need to store the data of multiple students then in that case, you would need to create these several variables again for each student. This is such a big headache to store data in this way. We can solve this problem easily by using structure. We can create a structure that has members for name, roll-number, marks and age and then we can create the variables of this structure for each student. In this assignment, You should create a structure of student. The structure should have three members: name (string), roll (integer), marks (float). Program should take input from the user ‘n’ for the number of students in the class. Then,

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture