oter

Pointers can be used for dynamic memory allocation from "summary" of C Programming Language by Brian W. Kernighan,Dennis Ritchie

Pointers can be used for dynamic memory allocation. When a program is running, the amount of memory it needs can sometimes be determined only during runtime. In such cases, we can allocate memory dynamically using pointers. This means that we can request memory from the system when needed, and free it when it is no longer needed. Dynamic memory allocation is done using the standard library functions malloc and free. The malloc function takes the number of bytes to allocate as an argument and returns a pointer to the allocated memory. This memory is not initialized, so it may contain garbage values. It is the programmer's responsibility to initialize the memory before using it. Once the memory i...
    Read More
    Continue reading the Microbook on the Oter App. You can also listen to the highlights by choosing micro or macro audio option on the app. Download now to keep learning!
    oter

    C Programming Language

    Brian W. Kernighan

    Open in app
    Now you can listen to your microbooks on-the-go. Download the Oter App on your mobile device and continue making progress towards your goals, no matter where you are.