I found this expression in a C program, and I did not understand it:
struct stack_rec *ss; ss=(struct stack_rec *)EMalloc(sizeof(struct stack_rec)); if (ss) { int res; res = (ss->elem = * i , 1); // what does this mean ???? if (res <= 0) return res; if (*s == 0) { ss->next = 0; } else { ss->next = *s; } *s = ss; return 2; } return 0;
What does res = (ss->elem = * i , 1); mean res = (ss->elem = * i , 1); ? Is this a logical expression? I tried it with 0 instead of 1, and it always returns the value of the second parameter! Can someone explain this expression please?
source share