When I try to use a pointer to short, I get undefined behavior or segmentation fault.
For example:
#include <stdio.h>
int main() {
    short int *a;
    *a = 10;
    printf("%hd\n", *a);
    return 0;
}
Nothing is displayed on the command line.
So I can`t understand how can I properly work with it.
 
    