%2d means that if the number is smaller than two spaces (__), there would be an extra space left to the left.
So, if you have


printf("%d", 1);
//The output will be:
//1

But if you have