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
icon
Related questions
Question

Programming in Language C  

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
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
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Concept of pointer parameter
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.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT