How is a macro different from a function?



How is a macro different from a function?..

Answer / Vipin Dahiya

{"Macro and Function":"In C programming, a function performs a specific task and returns a value. A macro expands to its replacement text at compile time before the code is executed. Macros are useful for simplifying repetitive code, but they lack error checking features of functions."}

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

Please send me WIPRO technical question to my mail ID.. its nisha_g28@yahoo.com please its urgent

1 Answers  


Explain what is a stream?

1 Answers  


Is c object oriented?

1 Answers  


What is the output for the program given below typedef enum grade{GOOD,BAD,WORST,}BAD; main() { BAD g1; g1=1; printf("%d",g1); }

4 Answers   ADITI,


What are the different types of data structures in c?

1 Answers  


write a c program to print the next of a particular no without using the arithmetic operator or looping statements?

2 Answers   TCS,


what are the 10 different models of writing an addition program in C language?

1 Answers  


Why are all header files not declared in every c program?

1 Answers  


Implement a function that returns the 5th element from the end in a singly linked list of integers in one pass.

11 Answers   Microsoft,


from which concept of 'c', the static member function of 'c++' has came?

1 Answers   Bosch,


Give basis knowledge of web designing ...

1 Answers   HCL,


The number of bytes of storage occupied by short, int and long are a) 2, 2 and 4 b) 2, 4 and 4 c) 4, 4 and 4 d) none

1 Answers  


Categories