google search

Popular Posts


Welcome to BCA Notes

>>>>>>>>>>>>>>>>

Visitors

Search This Blog

Blogger templates

Visitor Map


Thursday 3 April 2014

Structure in c++

#include<iostream.h>
struct stud
{
        char *name;
        int age;
};
main()
{
        struct stud s[3]={{"kunal",18},{"sachin",18},{"khushal",18}};
        for(int i=0;i<3;i++)
        {
                cout<<s[i].name<<endl;
                cout<<s[i].age<<endl;
        }

}

0 comments:

Post a Comment