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 / 239.jpg < prev    next >
Joint Photographic Experts Group Image  |  2013-12-11  |  584KB  |  2550x3300
Labels: book | bulletin board | crt screen | monitor | poster | reckoner | sky
OCR: Passing Parameters to Functions 239 area calcul ate length, width di splay area return 0 get input() void get input double +len ptr double *wid ptr Note 3 printf( "Enter the length scanf "glf" len ptr Note 4 pr intf "Enter the width scanf( wid ptr Note 4 return, cal cu ate) double calculate( double vall, double val2 return( vall val2 display) void displ lay double printf( "The area 5 .2f\n 9 The program consists of the functions main get input ,calcul ate (} and displ The subfunctions correspond exactly to the three identified tasks that need performed by the program In main() the variables are declared and the functions are called. Note 1: The variables length, width, and area are used by the subfunctions. They are declared in main ( and made available to each subfunction through the para ...