it is unclear what you are asking, but if you are wondering why c is equal to 4 it is because you declared it to be the value of a+b, which makes the scanf("%d",&c); line completely useless if I say
int c=5;//initiates c with the value of 5
c=6;//changes that value to 6
printf("%d",c);
output:
6
so when you say
scanf("%d",&c);//is whatever the user inputs
c=a+b;//is no longer user input, but instead a+b
you are overidding the initial assignment