difference between constants and macros

Status
Not open for further replies.

bagavathi

Member level 3
Joined
Nov 15, 2011
Messages
58
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
Tamil Nadu,India
Visit site
Activity points
1,686
Hi friends,

constants and macros what is the major difference?. and which is best ?

somebody said macros reduce the program size and in increase speed. someone says if increase the macros it will reduce the speed. which is correct.
 

Macro is the fastest, but whenever you used a macro that will be replaced by the constant (by pre processor)and stored on the ROM but if you use a const it will store only once and take it to operate, operationally there is no difference...
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…