What is the difference between macros and inline functions?

Answer Posted / kiran kumar yakkala

Macro- does not involve in compilation if there is any
logical error also just replaces the code
inline- look like function, but control doesn't goes to
fucntion and execute, it simply replaces the code like
macro but involves in compilation.

Is This Answer Correct ?    9 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of a ‘’ character?

586


Write a C++ program to generate 10 integer numbers between - 1000 and 1000, then store the summation of the odd positive numbers in variable call it sum_pos, then find the maximum digit in this variable regardless of its digits length.

1570


Where is c used?

647


How can I make sure that my program is the only one accessing a file?

678


Explain the priority queues?

623






If jack lies on Mon, Tue Wed and jill lies on Thursday, Friday and Saturday. If both together tell they lied yesterday. So c the given options and then c cos in the given dates one will be saying the truth and one will be lying. I got Thursday as option because jack is saying the truth he lied yest but jill is lying again as he lies on that day.

1789


in ‘C’ language for Matrix Multiplication fails” Introspect the causes for its failure and write down the possible reasons for its failure.

7404


What is static function in c?

632


Here is a good puzzle: how do you write a program which produces its own source code as output?

595


What is the sizeof () a pointer?

545


What is the use of gets and puts?

601


Why header file is used in c?

577


What are the advantages and disadvantages of a heap?

707


How can I open a file so that other programs can update it at the same time?

658


Devise a program that inputs a 3 digit number n and finds out whether the number is prime or not. Find out its factors.

669