How to store an interger value of 4 bytes in a memory of chunk which is malloced as type char
- by Adi
Dear all,
Hello Guys!!
This is my first post in the forum . I am really looking forward to having good fun in this site. My question is :
int mem_size = 10;
char *start_ptr;
if((start_ptr= malloc(mem_size*1024*1024*sizeof(char)))==NULL) {return -1;}
I have allocated a chunk of memory of type char and size is say 10 MB (i.e mem_size = 10 );
Now…