+ 2
We mostly using this when we dealing with floating values . If we want to print digits upto which we want.
Here %2.4 2 won't effect your program u can also write %.4 instead of 2.4 it will print number upto four digits here u used single digit number so 3 zero will added automatically
printf("%2.4d",a);
+ 2
Yeah same try with float u will understood better