Is it possible to store 5 ints in this below data structure?
int *p = malloc(5);
no, you can store only 5 bytes in it, each int is 4 byte, so max u can store 1 integer in it.
it is machine dependent.
it gives compile time error, it is wrong way of initializing a int pointer.
Back To Top