N
Nishu
Hi All,
Is this wrong(or undefined) implementation in C?
/* start */
#include<stdio.h>
#define min(a,b) (a<b? a:b)
int main(void)
{
int i,j,k;
i = 1;
j = 2;
k = min(i++, j); /* is this exp undefined because I'm using
increment operator */
printf("i = %d j = %d k = %d\n", i,j,k);
return 0;
}
/* end */
Thank n Regds,
Nishu
Is this wrong(or undefined) implementation in C?
/* start */
#include<stdio.h>
#define min(a,b) (a<b? a:b)
int main(void)
{
int i,j,k;
i = 1;
j = 2;
k = min(i++, j); /* is this exp undefined because I'm using
increment operator */
printf("i = %d j = %d k = %d\n", i,j,k);
return 0;
}
/* end */
Thank n Regds,
Nishu