Tag Archives: definition


What is the difference between a function and a macro? Find the largest number among two numbers using a function definition as well as a macro. Which is more efficient in terms of execution time and code size? 10m Jun2006

What is the difference between a function and a macro? Find the largest number among two numbers using a function definition as well as a macro. Which is more efficient in terms of execution time and code size? 10m Jun2006  Difference between a function and a macro:    Function Code  Macro Code Function takes 5… Read More »

Write a symbolic constant or a macro definition for each of the following : 9m Dec2005

 Write a symbolic constant or a macro definition for each of the following : 9m Dec2005 (i) Define a macro called AREA, which will calculate area of circle in terms of radius. Use the constant PI in calculation. # include<stdio.h> # define PI 3.142857 # define AREA(radius) PI * radius * radius main( ) {… Read More »