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 / 237.jpg < prev    next >
Joint Photographic Experts Group Image  |  2013-12-11  |  592KB  |  2550x3300
Labels: book | crt screen | monitor | reckoner
OCR: Passing Parameters to Functions 237 int2 int3 pir &int3 irt2 d, irt2 is d, printf "Back in main, intl is intl, int2) pr. nt "and int3 3a. \n\n", int3 pr p1 intf sint3, int3 int2 is sa, "Back main, intl is sd, int int2 printf( "and int3 is d. \n int3 ); return void p1 int *i, int "In pl, is sa, aud is gd.\n", *i,j; OUTPUT: Back ma in, inti and and int3 In aid int3 is Bac int int.2 and Using Pointers and Parameters Now that we know how to use pointers to simulate pass by reference parameters, 1 makes it we possible need to to write provide more program structure to to our programs. simple rectangle example Three suppose are calculate the area width of a as input, 4-12 calculat- Each ing step steps the is involved: and as obtaining the values of "the length and in() drives Example the program ...