Write a program that declares such a structure and creates


Problem

The Candy Bar structure contains three members. The first member holds the brand name of a candy bar. The second member holds the weight (which may have a fractional part) of the candy bar, and the third member holds the number of calories (an integer value) in the candy bar. Write a program that declares such a structure and creates a Candy Bar variable called snack, initializing its members to "Mocha Munch", 2.3, and 350, respectively. The initialization should be part of the declaration for snack. Finally, the program should display the contents of the snack variable.

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Write a program that declares such a structure and creates
Reference No:- TGS02635119

Expected delivery within 24 Hours