Structure Example 2 – C++ Language

#include <iostream>

using namespace std;
struct student
{
string name;
};
int main()
{
struct student a;

cout<<“Enter the name of student”<<endl;

cin>>a.name;

cout<<“student names is : ” <<a.name<<endl;

return 0;
}