Define a structure in c++, C/C++ Programming

Assignment Help:

Define a structure in C++:

Write a program a structure in c++ program.

void main()

{

                struct player

                {

                char name[20];

                int age,height;

                }    ;

       struct player p[3];

 

                int i,j,k;

                clrscr();

                for (i=0;i<=2;i++)

                    {

                      printf("Enter the name of player %d ,age %d,height %d\n",i+1,i+1,i+1);

                      scanf("%s %d %d",p[i].name,&p[i].age,&p[i].height);

                    }

                                for (i=0;i<=2;i++)

                    {

                       printf("%s %d %d\n",p[i].name,p[i].age,p[i].height);

                    }

       getch();

}


Related Discussions:- Define a structure in c++

Stone game, how to write a c program for stone game

how to write a c program for stone game

Function, give an example of function

give an example of function

Explain protected derivation, Protected derivation In addition to doing...

Protected derivation In addition to doing private and public derivations, you may also do a protected derivation. In this situation :   The private members inherited

Inside and outside type casting, depth description of the inside and outsid...

depth description of the inside and outside typecasting

Define variable declaration in c++, Variable Declaration This declarati...

Variable Declaration This declaration of variables in the C language is permitted only in the starting of their block, prior to executable program statements. In C++ declaratio

C++ coursework programming for engineering, Hi there I am looking for hel...

Hi there I am looking for help with c++ coursework. Could you please provide me with email address to email a copy of it. Thanks

Common concepts of object oriented, Object Oriented Programming Paradigm: ...

Object Oriented Programming Paradigm: For OOP, Paradigm is a standard set.  The OOP will help to develop software in modules, which will be integrated later as a full packag

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd