A
aarklon
Hi all,
1) #define COMBINE(x,y) (x##y)
int main(void)
{
int i;
i=COMBINE(14+1 ,1+14);
printf("\n i = %d",i);/* produces 39*/
i=COMBINE(10+5 ,5+10);
printf("\n i = %d",i); /*produces 75*/
i=COMBINE(13+2 ,2+13);
printf("\n i = %d",i); /*produces 48*/
return(0);
}
why these different results are produced???
2) int i =- -2;
printf("i =%d ",i); yields 2,why maximal munch rule is not applied
here???
3) int i = *(int*)2;
int main(void) {return 0; }
why this is generating illegal initialization error message???
4) why ~= operator is not permitted in C???
5) char a = 'AB'
printf("a =%c ",a);produces A on some compilers,B on some compilers
why??
Thanks in advance for any replies
1) #define COMBINE(x,y) (x##y)
int main(void)
{
int i;
i=COMBINE(14+1 ,1+14);
printf("\n i = %d",i);/* produces 39*/
i=COMBINE(10+5 ,5+10);
printf("\n i = %d",i); /*produces 75*/
i=COMBINE(13+2 ,2+13);
printf("\n i = %d",i); /*produces 48*/
return(0);
}
why these different results are produced???
2) int i =- -2;
printf("i =%d ",i); yields 2,why maximal munch rule is not applied
here???
3) int i = *(int*)2;
int main(void) {return 0; }
why this is generating illegal initialization error message???
4) why ~= operator is not permitted in C???
5) char a = 'AB'
printf("a =%c ",a);produces A on some compilers,B on some compilers
why??
Thanks in advance for any replies