Build C statements to accomplish each of the following: a) Define a structure called ingredients containing float variable flour and int array colourings with 2 colours b) Define ingred to be a synonym for the type struct ingredients. c) Use ingred to declare variable cake to be of type struct ingredients. d) Define a pointer pcake to point to cake. e) Prompt the user to enter the amount of flour using cake. f) Prompt the user to enter the coloring numbers, which can range from 1 to 9. g) Using pcake, display the amount of flour
Build C statements to accomplish each of the following: a) Define a structure called ingredients containing float variable flour and int array colourings with 2 colours b) Define ingred to be a synonym for the type struct ingredients. c) Use ingred to declare variable cake to be of type struct ingredients. d) Define a pointer pcake to point to cake. e) Prompt the user to enter the amount of flour using cake. f) Prompt the user to enter the coloring numbers, which can range from 1 to 9. g) Using pcake, display the amount of flour
C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter16: Searching, Sorting And Vector Type
Section: Chapter Questions
Problem 20PE
Related questions
Question
![Build C statements to accomplish each of the following:
a) Define a structure called ingredients containing float variable flour and int array
colourings with 2 colours
b) Define ingred to be a synonym for the type struct ingredients.
c) Use ingred to declare variable cake to be of type struct ingredients.
d) Define a pointer peake to point to cake.
e) Prompt the user to enter the amount of flour using cake.
f) Prompt the user to enter the coloring numbers, which can range from 1 to 9.
g) Using pcake, display the amount of flour](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F58c98c03-a205-4442-851c-5d58ade93297%2Fa5a8d84b-013f-4c62-bda5-628569a61da1%2Fe1cupjm_processed.png&w=3840&q=75)
Transcribed Image Text:Build C statements to accomplish each of the following:
a) Define a structure called ingredients containing float variable flour and int array
colourings with 2 colours
b) Define ingred to be a synonym for the type struct ingredients.
c) Use ingred to declare variable cake to be of type struct ingredients.
d) Define a pointer peake to point to cake.
e) Prompt the user to enter the amount of flour using cake.
f) Prompt the user to enter the coloring numbers, which can range from 1 to 9.
g) Using pcake, display the amount of flour
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
![C++ for Engineers and Scientists](https://www.bartleby.com/isbn_cover_images/9781133187844/9781133187844_smallCoverImage.gif)
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
![C++ for Engineers and Scientists](https://www.bartleby.com/isbn_cover_images/9781133187844/9781133187844_smallCoverImage.gif)
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT