What is output of the following snippet

#include stdio.h
void solve() {
int a = 3;
int res = a++ + ++a + a++ + ++a;
printf("%d", res);
}
int main() {
solve();
return 0;
}
A)12
B)24
C)20
D)18

Posted on by