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

โˆ™ 2008-07-28 13:13:06
This answer is:
๐Ÿ™
0
๐Ÿคจ
0
๐Ÿ˜ฎ
0
User Avatar

Add your answer:

Earn +20 pts
Q: What is the difference between a macro and typedef?
Write your answer...
Submit
Sign up for more answers

Registered users can ask questions, leave comments, and earn points for submitting new answers.

Already have an account? Log in

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.


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

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


What are the difference between micro marketing environment and macro marketing environment?

Difference between micro and macro marketing


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?

Macro is big micro is small.


Difference between macro and micro?

Macro is big micro is little


What is the difference between mirco and macro?

mirco= small macro= large


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.


What is difference between define and typedef in c plus plus?

#define is a preprocessor directive used to declare macros. typedef is a C++ keyword to define a data type.


What is difference between macro processor and macro assembler?

Ask Stephen short...he knows all ;)


What is the difference between micro and macro- evolution?

The difference between micro and macro evolution is that micro evolution does not involve creation any new allele while macro evolution involves creation of the new alleles.


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


What is the difference between Fanuc CNc and Siemens CNC?

macro


What is the difference between Marco and aperture?

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


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 macros and sub routine?

A macro is the entire section of code, while a sub-routine is part of the macro.


Difference between macro molecules and micro molecules?

the molecules required by our body in small quantity is kown as macro molecules


What is the difference between macro- and microeconomics?

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


What is the Major difference between micro and macro ecomics according to McConnell?

Micro


What is the difference between a macro and micro digital camera lens?

On SLRs, macro lenses are specially corrected for extreme close-up work. Nikon brand macro lenses bear the name 'Micro', so there is really not much difference.


What is the difference between macro and define?

A macro is simply a text-substitution mechanism. You use the #define directive to define both macro symbols and precompiler directives. Every occurrence of a macro symbol within your code is substituted with the macro definition during preprocessing.


What is the difference between the prefixes macro and micro?

Macro refers to something large in scale, scope or capability; micro, is the opposite, and refers to something small