C - Write program to align integer output

Requirements

Write program to align integer output

Demo

#include <stdio.h>
#include <ctype.h>

int main()// w w  w .  jav  a 2s . c  o  m
{
    int index;
    int alpha=123,blank=12,punct=3;

    printf("%4d alphabetic characters\n",alpha);
    printf("%4d blanks\n",blank);
    printf("%4d punctuation symbols\n",punct);

    return(0);
}

Result