what is differnence b/w macro & functions
macro: one line function;not having any return type and
argument so it would not report error even if any
misbehaves in fnction;not having return statement;
macros would be replaced by that functions/value where ever
macro name presents;if we need any later change in funcions
then modifing only at macro is neccssary, sicne it is
replacing wherever macro name presents.
functions:we would recieve error if the function call and
function prototypes are mismatch;xplicitly it should have
one return statement if the retrun type of fucntion is
aother than void;control from main function would jump to
function defintion of called fucntion if that function is
called rather than replacing the function;it may have moe
than one line function.If we want later change i fucntion
execution,then we need to modify on function prototype(if
modified),fucntion defintion and whereever that function is
called.
| Is This Answer Correct ? | 4 Yes | 2 No |
what is the significance of static storage class specifier?
What are the advantages of using macro in c language?
What are the types of operators in c?
What is the difference between procedural and functional programming?
Define function ?Explain about arguments?
2 Answers Geometric Software, Infosys,
Is c still used?
How do I read the arrow keys? What about function keys?
Is the exit() function same as the return statement? Explain.
0 Answers Agilent, ZS Associates,
Write a c program to read a positive number and display it in words.? ex: 123=one two three help me....
main() { char *p; p="Hello"; printf("%c\n",*&*p); }
Draw a flowchart to produce a printed list of all the students over the age of 20 in a class .The input records contains the name and age of students. Assume a sentinel value of 99 for the age field of the trailer record
Are comments included during the compilation stage and placed in the EXE file as well?