What would you like to do?

What are the advantages of using typedef in a program?

already exists.

Would you like to merge this question into it?

already exists as an alternate of this question.

Would you like to make it the primary and merge this question into it?

exists and is an alternate of .

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;
6 people found this useful
Thanks for the feedback!

Several advantages to using a modular approach in programming?

It is easy to understand small sections of code in the modular programming.You can store the code across multiple files.Modular   programming allows collaborative programm

Advantage of using looping statements in java programs?

  Loops allow you to save space in source code and execute code an arbitrary number of times. The only other way to do this would be recursion, but with Java's fixed stack

What is the difference between a macro and typedef?

  A Macro is a preprocessor directive means that before compilation the macros are replaced.   Where as typedef is defining a new data type which is same as the existin

Advantages of using C programming language?

uses of C: C was initially was used for system development work. But why use C..?? mainly because it produces code that run nearly as fast as written in assembly language{dire

What is typedef in C?

 A typedef declaration lets you define your own identifiers that can be used in place of type specifiers such as int, float, and double. A typedef declaration does not rese

Advantages and disadvantages of using library program?

A library program allows users to conduct research and read for  pleasure. Libraries are also organized and have a staff available  to assist patrons. However, libraries can

What are the advantages of using a free invoice software program?

There are a few advantages of using a free invoice software  program. The most important advantage is that it is free. The free  software helps you to manage your invoices e

What are the advantages and disadvantages of using reverse engineering to discover the logics of a software program?

Reverse engineering in software is reversing a program's machine code back into it's original source code. The advantages to using this technique is that one can repair certa

What is the the purpose of typedef feature. How this feature is used in conjunction with structures. Explain?

You use typedef to declare a synonym for an existing type. It's generally just a way of reducing a complex or cumbersome declaration outside your code to a more simplified, mo

Why use typedef function in c?

"typedef" is not a function, it is a keyword. It is primarily used  to declare an alias, an alternate name for a type that already  exists. This is typically done when the e

What are five advantages to using case structure to program multiple alternative decisions?

1. Switch/case structures yield cleaner, more maintainable code  than equivalent nested if..else statements.   2. With if...else statements, the programmer must put the m