1 Need a lot of if to judge, it feels not very beautiful to use, so
#include<stdio.h>
#define MWE(A,B) {if(A) {B}}
int add(int a,int b)
{
int c= a+b;
printf("value is %d\n",c);
}
int main(void)
{
MWE(1,printf("hello\n"););
MWE(0,add(2,5););
MWE(1,add(5,5););
}
But the two semicolons are strange
MWE(1,add(5,5););
so
#include<stdio.h>
#define MWE(A,B) {if(A) {B;}}
int add(int a,int b)
{
int c= a+b;
printf("value is %d\n",c);
}
int main(void)
{
MWE(1,printf("hello\n"););
MWE(!(0),add(2,5));
MWE(1,add(5,5));
}