Page 14 - Data Struct
P. 14

14
                   Algorithm and Data Structure


                   EXERCISE CHAPTER 1




                     i.   Understand and write appropriate structure definition based
                          on the given data;

                          i.   Structure type called Car with five members PlatNo (10
                               character), Car Type Color (20 character), Color (20

                               character), Year Manufacture and  Car Price in a different

                               data type.
                         ii.   Input the data for the each structure variable

                         iii.   Display the car data based on your creativity




                     2.  Declare a variable of struct type named Fruits, structure have
                          the elements:

                                 Char name [30];

                                 Double price;
                                 Double weight;



                          i.     Declare a struct variable named apple and mango
                          ii.    Insert a data for each struct variable

                          iii.   Calculate the total price for apple and mango. Total
                                 price is based on price and weight
   9   10   11   12   13   14