answersLogoWhite

0


Best Answer

When you define a structure, C does not provide a type for that structure. In order to subsequently declare an instance of that structure, you need to use the word struct again. The typedef allows you to declare a type equivalent to the structure. For example... struct person { char* name, int phone}; struct person myperson; With typedef, you can simplify to... typedef struct person { char * name, int phone} person;person myperson; In C++, this is automatic, but not in C.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the main use for type def seems to be defining structures?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the main type of structure built to protect harbors from the sea called?

shoreline structures


What is Oceania's native food?

Fish is the main type of food and coconuts seems to be the secondary choice.


What type of structures are minerals?

Maybe minerals is a type of structures of phosphates or carbonates


Is cirrus a noun?

No. It is an adjective defining a type of cloud.


Defining a variable syntax?

[storage-class] [const] [type modifiers] type name [= inital-value] ;


How do you obtain cour?

Please be more specifical defining what type of cour you mean.


What type of structures are affected by rusting?

...


In what type of structures did the Pueblos dwell?

They dwell in baked mud structures! Hope it helped :)


If you write int in place of void in public static void main what happand?

If you change the return type (to any type no only int) of your 'main' method the jvm no longer can use this method as a entry point for your program. It seems to be no errors, but your program do nothing.


what are the characteristics used when grouping organisms?

Because various organisms may share the same habitat but have completely distinct forms and structures, the more basic feature for defining organisms is the type of cells they are formed of. As a result, their residence cannot be used to classify them. On the basis of cell type, we can divide all living things into ekaryotes and pokkaryotes.


What type of plants use cones as reproductive structures?

All gymnosperms have cones as reproductive structures.


What shape is the structure of xylene?

Xylene is a ring of hydrocarbons, with some secondary structures attached like branches. The location of the branches on the main ring change depending on the specific type of xylene.