CrazyEngineers Archive
Old, but evergreen and popular discussions on CrazyEngineers, presented to you in read-only mode.
@TechyGuy • 05 Dec, 2011
please could you throw some light on the topic. 😀

thank you.
@Pensu • 05 Dec, 2011 As far as i have studied macros are preprocessor directives. Now, preprocessor directives are executed before actual compilation of the code. As you might know their value is replaced in the program before the code gets compiled. Or in simple language you can say preprocessor directives is a concept and macros are entities.
I know this is a bit ambiguous, but i hope it clears your doubt.

P.S: Correct me if i am wrong.
@Ankita Katdare • 05 Dec, 2011 • 1 like Whoa! How will you compare these two terminologies?

A preprocessor is a program that processes its input data to produce output that is used as input to another program.
The output is said to be a preprocesed form of the input data, which is often used by some subsequent programs like compilers.

Thus, the C preprocessor handles directives for source file inclusion (#include), macro definitions (#define), and conditional inclusion (#if).
An example of Macro Expansion:
#define PI 3.1415
Above definition lets you use "PI" instead of every occurrence of 3.14159.

Related Posts

@tazz · Jan 27, 2010

guys, i want to learn a programming language. please tell me which is the most useful 1 for E.C.E ????

@nenuadwani · Apr 3, 2011

There are two cities A and B 1000 km apart. An elephant is having 3000 bananas with him which he has to carry from city A to B. He can...

@Satya Swaroop Dash · Jun 15, 2014

Attention Mozilla fans, we have good news for you. When you upgrade your Firefox for Android to its latest version you will be able to run Firefox OS apps on...

@Ankita Katdare · Dec 23, 2013

HTC has launched a new smartphone in its Desire range of phones with HTC Desire 400. HTC - the major smartphone brand from Taiwan quietly released the Desire 400 smartphone...

@Sourabh Sandal · Mar 16, 2015

Project Abstract / Summary : Project Summary: -We use solar energy in many ways. All day, we use sunlight to see what we‰Ûªre doing and where we‰Ûªre going. Solar energy...