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 calloc() function?
What does c mean?
The statement, int(*x[]) () what does in indicate?
for(i=1;i>0;i++); printf("i=%d",i); what will be the answer????
write a reverse string to print a stars.(with out using logic) ***** **** *** ** *
1 1 1 1 2 1 1 3 3 1 1 4 6 4 1
Differentiate between new and malloc(), delete and free() ?
char S; char S[6]= " HELLO"; printf("%s ",S[6]); output of the above program ? (0, ASCII 0, I,unpredictable)
Are there namespaces in c?
How are variables declared in c?
Do you know pointer in c?
What are dynamically linked and statically linked libraries?