Yes, you may use a double pointer to store the address of another pointer as well for creating a matrix, the compiler won't complain.
The memory you are going to use does actually depend on the
balasubramaniyan94 wrote:value = (int **) malloc(sizeof(int)*2);
The above line is wrong, it should be
value = (int **) malloc(sizeof(int *) * 2);
(You are lucky if, as often happens,
sizeof(int) == sizeof(int *)