Saturday, 12 March 2016

Devise a structure declaration that describes a fish.The structure should include the kind, the weight in whole ounces, and the length in fractional inches

Leave a Comment

Question:

Devise a structure declaration that describes a fish.The structure should include the kind, the weight in whole ounces, and the length in fractional inches.

Answer:

struct fish {
       char kind[20];
       int weight;
       float length;

};

Source:

C++ Primer Plus Sixth Edition Chapter Review

If You Enjoyed This, Take 5 Seconds To Share It