home *** CD-ROM | disk | FTP | other *** search
/ C by Discovery (4th Edition) / C_By_Discovery_4th_Edition.tar / C_By_Discovery_4th_Edition / CH_04 / 257.jpg < prev    next >
Joint Photographic Experts Group Image  |  2013-12-12  |  824KB  |  2550x3300
Labels: book | reckoner | shelf
OCR: Pointers and Dynamic Memory Allocation 57 4.10 *****/ This program consists of four functions ma in, intro input rolls() and calcul ate and di splay The function main serves driver; declares and initializes the variables and calls the other functions The function int ro consists of fcalls top int f for output. The function input rolls and accepts input of the results ca. of rolling the die and verifies that each input is between occur The function lculate and display() counts the number of rences of each number between 1 and and displays the results on the terminal screen Note 1:The include file stdlib.h contains the prototypes of the functionmalloc( that dynamically allocates memory and the function free that de-allo- cates the memory Note 2 The function ma .oc is called to allocate an ar ...