answersLogoWhite

0


Best Answer

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 existing data type. Syntax: typedef Existing datatype New datatype For example typedef int NUMBER; Here NUMBER (New datatype)is defined as a data type which contains the properties same as int(Existing datatype). You can declare a variable of int as NUMBER a; is same as int a; similarly typedef int* NUMBERPOINTER; NUMBERPOINTER a; Here a is a pointer of integer type.

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the difference between a macro and typedef?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the difference between Typedef and Reference in C plus plus?

A typedef is a compiler macro. A reference is a pointer, usually implemented with transparent syntax. They have no relationship between each other.


Difference between macro and micro?

Macro is big micro is little


What is the difference between executing a macro and calling a macro?

Calling a macro loads the macro into memory, while executing the macro runs the macro.


What is the difference between macro and micro neutrons?

macro is bigger than micro


What is the difference between macro and micro decomposers?

The difference between macro and micro decomposers is micro decomposers can't be seen by the naked eye while macro decomposers are big enough so they can be seen.


Micro to macro processes in an ecosystem?

t s the difference between micro and macro process in the ecosystem?


Give the differences between micro and macro economics?

ten difference of micro economics macro economics


What is the difference between a macro burst and a micro burst?

nuguu


Difference between micro hardness and macro hardness test?

micro is on a small scale and macro on a larger scale


What is the difference between macro and microeconomics?

macro- and microeconomics courses (the "big picture" versus individual companies/persons)


What is the difference between Marco and aperture?

The same as the difference between huoses and oranges. Did you mean "macro" instead of "marco"?


Differences between micro environment and macro environment of an organization?

Uranus is the greenish blue planet and it is gaseous.