answersLogoWhite

0

Structure declaration syntax:

struct tag_name

{

data_type member1;

data_type member2;

_______________________

_______________________

data_type membern;

};

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

Can be declared the structure in void main?

yes


How is structure type pointer variable declared?

struct thisorthat *ptr;


How is a structure type pointer variable declared?

struct thisorthat *ptr;


How is a structure type pointer variable declared in c?

struct thisorthat *ptr;


Why do you go for structure and union?

Structure and union are a form of encapsulating similar data elements.Structure:Whenever a structure is declared, then space equal to the total size of the elements defined inside the structure is allocated. Hence each individual element has its own memory space. Hence structures are commonly used when there is usage for more than one element declared inside the struct at a time.Union:Whenever an union is declared, then space equal to the size of the maximum element defined inside the union is allocated. Hence the individual elements share a common memory space. Hence union is commonly used when there is usage for only one element declared inside the union at a time.


How are structure elements stored in memory in c?

Structure elements in C are stored in memory contiguously based on the order in which they are declared in the structure definition. The elements are typically aligned to memory addresses that are multiples of their size to optimize access speed. The size of the structure is determined by the sum of the sizes of its individual elements, possibly with padding to ensure proper alignment.


What happens if we use an integer pointer as a member of structure instead of structure pointer?

By declaring an integer pointer you are declaring that any non-zero reference stored in the pointer is guaranteed to be an integer reference. In order to guarantee the reference is actually a structure, the pointer must be declared as such, because casting an integer to a structure can never be regarded as being type-safe.


Have the s.y.b.a results declared?

no not declared'


How can structures be declared and used in c program?

You declare a structure as follows:struct name {typename_1 member_name_1; typename_2 member_name_2;// additional members...};


Who did they declared the independence from?

they declared Independence from the British


How was Armistice Day declared?

A guy declared it.


Was the declaration declared from England?

no it was declared from Boston Massachusetts or somewhere in the 13 colonies no, i believe it was declared in Rhode Island or Pensylvania, and it was declared AGAINST England.