Exercise: 1. Match the number with the appropriate label. Label : a. Structure members b. Initialization of all of the structure members for the variable wood c. Structure tag d. Initialization of structure variable's members e. Structure definition f. Reading and printing structure members. g. Declarations of variables of structure types 1 include sinclude struct Consumption{ char city[20): int year; double usage; 2 3 struct Resource char material[30]; double logitude; double latitude; double quantity; char units[20); 2 4 int main(O{ struct Resource metal, fuel: struct Resource wood ={tOak", 32.5, 13.2, 5e+8, "hectares"}; struct Consumption water, power; metal.logitude = 57-3: metal.latitude = 32.1; metal.quantity = 3e+10; strepy(metal.material, "Iron"); strepy(metal.units, "cubic meters"); 6. printf("The metal information is: \n%s\n%4.1lf degress longitude\n%4.1lf degress" "latitude\n%4e %s\n\n",metal.material, metal.logitude, metal.latitude, metal.quantity, metal.units); printf("Enter water and power : \ncity, year and usage\n"); scanf("%s%d%lf%s%d%ir,&water.city, &water.year, &water.usage,&power.city,&power.year,&power.usage); 7 printf("\n\nThe water and power are : \n%s\n%d\n%4.01f million liters\n\n%s\n%d\n%4.01lf mega watts\n", water.city, water.year, water.usage.power.city.power.year.power.usage); 2. Develop a complete program for currency conversion rate as defined in Table 1. In main function, your program should prompt the currency conversion selection, and the USD value should be received through user input. Then, the conversion selection and USD value will pass to function name as convert. The convert function is used to convert the currency from USD into other currency according to conversion selection. The conversion value will return to called function. 3.
Exercise: 1. Match the number with the appropriate label. Label : a. Structure members b. Initialization of all of the structure members for the variable wood c. Structure tag d. Initialization of structure variable's members e. Structure definition f. Reading and printing structure members. g. Declarations of variables of structure types 1 include sinclude struct Consumption{ char city[20): int year; double usage; 2 3 struct Resource char material[30]; double logitude; double latitude; double quantity; char units[20); 2 4 int main(O{ struct Resource metal, fuel: struct Resource wood ={tOak", 32.5, 13.2, 5e+8, "hectares"}; struct Consumption water, power; metal.logitude = 57-3: metal.latitude = 32.1; metal.quantity = 3e+10; strepy(metal.material, "Iron"); strepy(metal.units, "cubic meters"); 6. printf("The metal information is: \n%s\n%4.1lf degress longitude\n%4.1lf degress" "latitude\n%4e %s\n\n",metal.material, metal.logitude, metal.latitude, metal.quantity, metal.units); printf("Enter water and power : \ncity, year and usage\n"); scanf("%s%d%lf%s%d%ir,&water.city, &water.year, &water.usage,&power.city,&power.year,&power.usage); 7 printf("\n\nThe water and power are : \n%s\n%d\n%4.01f million liters\n\n%s\n%d\n%4.01lf mega watts\n", water.city, water.year, water.usage.power.city.power.year.power.usage); 2. Develop a complete program for currency conversion rate as defined in Table 1. In main function, your program should prompt the currency conversion selection, and the USD value should be received through user input. Then, the conversion selection and USD value will pass to function name as convert. The convert function is used to convert the currency from USD into other currency according to conversion selection. The conversion value will return to called function. 3.
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Expert Solution
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
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
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education