answersLogoWhite

0

1. Readability. Just like naming your variables properly can show how you intend to use the variable, renaming the type can help show how you intend to use all variables of this type. It eliminates the possible bug of incorrect argument ordering (e.g. if a method signature has multiple boolean flags).

2. Portability. On different systems you might want to have the same variable name (because you're using it the same way) to be of a different type. So you keep the typedef in a header file controlled by conditional compilation (for example) for maximal portability. 3. decreases complexity for declaring complex and repeated declarations like typedef unsigned long int UINT64;

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

What are the advantages of using typing tutor program?

amara


How do you write a c program that define a structure linesegment that will represent a line segment by the co-ordinate of its endpoint?

There will a part like this: typedef struct Point { double x, y; } Point; typedef struct LineSegment { Point from, to; } LineSegment;


What are the five advantages and five disadvantage of using case structures to program multiple alternative decision?

what are five advantages and five disavantages of using case structures to multiple alternative dicisions


Typedef int a a a Is this possible in C?

No, but 'typedef int a;' is possible, it defines the type 'a'.


What are the Uses of typedef?

the purpose of typedef is to redefine the name of an existing variable type. e.g. typedef unsigned long int T; T v1,v2;


What is the advantage of using a capitol one mastercard?

There are many advantages of using a Capital One Mastercard. Some of these advantages include the security of zero dollar fraud liability and the Capital One No Hassle rewards program.


What are some advantages and disadvantages of using programmable logic to control machines versus monitoring and adjusting processes manually?

advantages- don't have to change the machine in order to adjust it, just change the program. disadvantage- your program could be wrong or screw up.


What is the use of type def in c?

A typedef is used to define a type. The clue is in the name: typedef = type definition.


How do we represent typedef in enterprise architect tool?

create class with typedef construct.and then add the base class with the name type


How is typedef different from int in c language?

They are entirely different things; int is a type, typedef is a way to define types.


What are the advantages of Staples Rewards program?

Some of the numerous advantages of the Staples Rewards program are free shipping when using their website, 5% back when purchasing, ink recycling rewards, and bonus events. You may also become a plus or premier member for even further rewards.


What are the advantages of using ict for a leaflet?

advantages of using ICT