I came across a code snippet which used a statement int k=(a++,++a) in it.
I don't understand which type of statement is this (a++,++a) and how it will be evaluated. Why is the bracket is used here? Is it a function call?
Here is the code.
#include <stdio.h>
int main(void) {
    int a=5;
    int k=(a++,++a);
    printf("%d\n",k);
    return 0;
}
The output I get is 7 — why is that?
 
     
    