Home » Programming Languages » C Programs » Macro with Argument in C

Macro with Argument in C

#include <stdio.h>

#define SQUARE(x) (x*x)

int main(void) {
	printf("SQUARE(9) is : %d\n", SQUARE(9));
	printf("SQUARE(25) is : %d\n", SQUARE(25));
	return 0;
}

Subscribe our Rurban Life YouTube Channel.. "Rural Life, Urban LifeStyle"

Leave a Comment