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.


How do you declare structure?

In programming, particularly in languages like C or C++, a structure is declared using the struct keyword followed by the structure name and a set of curly braces containing its members. For example: struct Person { char name[50]; int age; }; This defines a structure named Person with two members: name and age. After the declaration, you can create variables of that structure type to store data accordingly.


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.