We'll guyz I'm sill noob at C & this sem is just over
k just a small ques.
What is the purpose of #
I know its a pre-processor
but if someone can clearly xplain what is is
Xplain in as much lines as u can & i'm ready to read all
Ya I know many of u'll say C suc*s but u know its worth 100 marks here
the character # when used at the begening of a line tells the compiler to perform the action mentioned in the line before compilation of the code. Hence its called a pre processor. It does stuff to the code like including headder file functions, etc which need to be done BEFORE compiling.
__________________ http://TheSmallerBang.wordpress.com
eMachines E725 - T4400 2.2GHz, 1GB, 160GB
Nokia 5130XM * T-Sonic 610 2GB
Nokia 2323C * Samsung Galaxy Y
Apple iPad 2 16GB WiFi
Any line with the # in the beginning is not compiled by the compiler. Thats because those lines are not part of the program, but rather, they contain information ABOUT the program. Thats not the exact way of putting it, but anyway. You can find more information on googling "Preprocessor Directives"
__________________
If the Start Windows Restart when Windows starts check box is checked Windows Restart will start automatically every time Windows is started. - Actual excerpt from a windows program help file
Dude dont get confused. # characters represents the beginning of a preprocessor directive. All preprocessor directives begin with a # and are also pronounced with it. A # directive is a special instruction to the compiler that it had to follow in the process of compiling. # character is used so that compiler can differentiate between a regular word and a preprocessor directive. # character signals the compiler start of a preprocessor directive. I hope its clear to u now
See, first the code is checked for any lines beginning with #. If found, the preprocessor processes those lines. PREprocessor. Get it? PRE = BEFORE. So, before compilation, preprocessor is called. Then all the # lines are processed by it. Then all other lines are compiled by the compiler.
__________________
If the Start Windows Restart when Windows starts check box is checked Windows Restart will start automatically every time Windows is started. - Actual excerpt from a windows program help file