Size of an int is 4 bytes and I am allocating only 1 byte.
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char ** argv) {
int *a = (int *) malloc(1);
// But I am still able to store int.
*a = 42;
printf("%d\n", *a);
// It also allowed me to store char in an int pointer.
*a = 'H';
printf("%c\n", *a);
}