Type prefixes: h : printf Type prefixes « printf scanf « C Tutorial






  1. Appear before type indicators d, i, o, u, x, and X.
  2. Display the value as short, for example, short integer (hd) and short unsigned integer (hu).
#include <stdio.h>
main()
{
    int f = 9999;
    printf(" %hu \n",f);
}
9999








4.18.printf Type prefixes
4.18.1.Type prefixes: h
4.18.2.Type prefixes: l (lower case l)
4.18.3.Type prefixes: L (upper case L)