• Register
100 points
7 2
Welcome to Kodlogs, programming questions and answer website.

The above statement describes the general characteristics of an object. For example, members of the union a(n) have names but the union itself has no name. A structure is defined as a data type in C++ language which allows the programmer to combine data of different types together. It thus helps in the construction of complex meaningful data types.  A structure is defined using a name as a type and specifies the sequence of its members or field.  When the members of the structure are used and the structure name is not declared, the former will be referred as it.


Below is an illustration of right declaration of structures:
Struct student 
{char name[25];
Int age ;
Char branch [10];
// F for female and M for male 
Char gender;

The struct student declared four fields for students; name, age, branch and gender. These are the structure members. Struct student is called structure tag.
Using the above example, if the structure tag was not declared as student then once the fields are used the programmer will get the error of “structure referred to as its”. 
100 points
7 2