What is dynamic memory allocation example?

ptr = (cast-type*) malloc(byte-size) For Example: ptr = (int*) malloc(100 * sizeof(int)); Since the size of int is 4 bytes, this statement will allocate 400 bytes of memory. And, the pointer ptr holds the address of the first byte in the allocated memory.9 Ara 2021

Sizin İçin Seçtik  How do I get a promo code for Google Play?

Leave a Reply

Your email address will not be published. Required fields are marked *