Chapter 11: Problem 35
A pet store sells dogs, cats, birds, and hamsters. Write a declaration for an anonymous enumerated data type that can represent the types of pets the store sells.
/*! This file is auto-generated */ .wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;text-decoration:none;padding:calc(.667em + 2px) calc(1.333em + 2px);font-size:1.125em}.wp-block-file__button{background:#32373c;color:#fff;text-decoration:none}
Learning Materials
Features
Discover
Chapter 11: Problem 35
A pet store sells dogs, cats, birds, and hamsters. Write a declaration for an anonymous enumerated data type that can represent the types of pets the store sells.
All the tools & learning materials you need for study success - in one app.
Get started for free
Look at the following structure declaration. struct FullName { char lastName[26]; char middleName[26]; char firstName[26]; }; Write statements that A) Define a FullName structure variable named info B) Assign your last, middle, and first name to the members of the info variable C) Display the contents of the members of the info variable
Write the declaration of a union called Items with the following members: alpha num bigNum real a character an integer a long integer a float Next, write the definition of an Items union variable.
Each of the following declarations, programs, and program segments has errors. Locate as many as you can. struct Values { char name[30]; int age; }
Define an array of 35 of the car structure variables. Initialize the first three elements with the following data: $$\begin{array}{llll} \text { Make } & \text { Model } & \text { Year } & \text { cost } \\ \text { Ford } & \text { Taurus } & 1997 & \$ 21,000 \\ \text { Honda } & \text { Accord } & 1992 & \$ 11,000 \\ \text { Lamborghini } & \text { Countach } & 1997 & \$ 200,000 \end{array}$$
Each of the following declarations, programs, and program segments has errors. Locate as many as you can. struct ThreeVals { int a, b, c; }; int main () { TwoVals s, *sptr; sptr = &s *sptr.a = 1; return 0; }
What do you think about this solution?
We value your feedback to improve our textbook solutions.