home *** CD-ROM | disk | FTP | other *** search
/ C by Discovery (4th Edition) / C_By_Discovery_4th_Edition.tar / C_By_Discovery_4th_Edition / CH_07 / 383.jpg < prev    next >
Joint Photographic Experts Group Image  |  2013-12-20  |  635KB  |  2550x3300
Labels: book | crt screen | daybook | poster | reckoner
OCR: Introduction to Structures 383 Constant Definitions #define ID SIZE Type Descr ipt ons struct auto part Note 1 char id[ID SIZE] double pri ice; int cur inv, xpression int main( void Note 2 struct auto part part J-145D 4.79, 12 structure pr intf( "Part-id: 85 In" part .id Note 3 he opera- pr: intf( "pri ice $88 2f n" part price Note but only printf "Quanti %8d\ part cur inv Note cells return Running the Program initial Part id: J-145D the vari- Price Quant ty This simple program consists of just the function main.A variable of type struct auto part declared and initialized in the same line 01 code Calls to pri n display the contents of this variable Note 1. The declaration of 'the type struct auto part indicates that it is a structure with three members. The id member an array JO type char ...