486,560 views
35 votes
35 votes
Write a c++ program that accept student information


User Lekens
by
2.8k points

1 Answer

14 votes
14 votes

Answer:

Structure

This program stores the information (name, roll and marks entered by the user) of a student in a structure and displays it on the screen.

To understand this example, you should have the knowledge of the following C++ programming topics:

C++ StructuresC++ StringsIn this program, a structure(student) is created which contains name, roll and marks as its data member. Then, a structure variable(s) is created. Then, data (name, roll and marks) is taken from user and stored in data members of structure variable s. Finally, the data entered by user is displayed.This 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.

Write a c++ program that accept student information ​-example-1
User Joshkurz
by
2.7k points