When I am executing the following code: 

```
#include <stdio.h>

int main(void) {
    int i=10;
    printf("%d",i,scanf("%d",&i));
    return 0;
}

```

Output which I am getting is user input

while for

```
int main(void) {
    int i=10;
    printf("%d",scanf("%d",&i),i);
    return 0;
}

```

Output is 1 if user input is correct(means integer type).
Why everytime scanf is executing and the output is not 10 in any of the case ?