home *** CD-ROM | disk | FTP | other *** search
/ C by Discovery (4th Edition) / C_By_Discovery_4th_Edition.tar / C_By_Discovery_4th_Edition / CH_11 / 626.jpg < prev    next >
Joint Photographic Experts Group Image  |  2013-12-20  |  747KB  |  2550x3300
Labels: book | crt screen | poster | reckoner
OCR: 626 Chapter C Library and Preprocessor Facilities int main( void int num; printf "Enter string of decimal digits: scanf( &num printf "That number \n" num return 11.5 Dynamic Allocation and De-allocation of Memory As we saw in Chapter 4 the library prov vides functions for dynamic allocation and de-allocation of memory. In this section, we will discuss the functions mal- loc and cal loc for allocating memory, and the function free for de- allocating memory The dec larations for the dynamic allocation functions are prov ided in a header file In ANS c the declarations will be in the file stdlib. h The function ma LOC takes one parameter. In ANSI c the parameter's type which is defined with type edef in several header files. The parameter tells mal loc the of bytes to allocate The return value ...