SlideShare a Scribd company logo
1 of 1
Define a structure called WeatherData to store the following weather data:
totalRainfall
highTemp
lowTemp
aveTemp
Declare an array of 12 structures to hold the weather data for an entire year. Assign memory to
the array of structures with the new operator.
Solution
#include using namespace std; //Declaring structure struct WeatherData { float totalRainfall;
float highTemp; float lowTemp; float aveTemp; }; int main() { //Memory assignment using new
operator WeatherData *pointer = new WeatherData[12]; // Rest of program return 0; }

More Related Content

More from gertrudet

More from gertrudet (15)

Describe the meaning and use of the NULL value in relational database.docx
Describe the meaning and use of the NULL value in relational database.docxDescribe the meaning and use of the NULL value in relational database.docx
Describe the meaning and use of the NULL value in relational database.docx
 
Describe the most common eligibility requirements in qualified plans-S.docx
Describe the most common eligibility requirements in qualified plans-S.docxDescribe the most common eligibility requirements in qualified plans-S.docx
Describe the most common eligibility requirements in qualified plans-S.docx
 
Describe how media formats- features- and trends differ around the wor (1).docx
Describe how media formats- features- and trends differ around the wor (1).docxDescribe how media formats- features- and trends differ around the wor (1).docx
Describe how media formats- features- and trends differ around the wor (1).docx
 
Describe stateful inspection firewalls- and explain how tables track t.docx
Describe stateful inspection firewalls- and explain how tables track t.docxDescribe stateful inspection firewalls- and explain how tables track t.docx
Describe stateful inspection firewalls- and explain how tables track t.docx
 
Describe a situation in which you have experienced harm as a consequen.docx
Describe a situation in which you have experienced harm as a consequen.docxDescribe a situation in which you have experienced harm as a consequen.docx
Describe a situation in which you have experienced harm as a consequen.docx
 
Describe how media formats- features- and trends differ around the wor.docx
Describe how media formats- features- and trends differ around the wor.docxDescribe how media formats- features- and trends differ around the wor.docx
Describe how media formats- features- and trends differ around the wor.docx
 
Describe briefly FIVE forms of protectionism a government could engage.docx
Describe briefly FIVE forms of protectionism a government could engage.docxDescribe briefly FIVE forms of protectionism a government could engage.docx
Describe briefly FIVE forms of protectionism a government could engage.docx
 
Define the processes of differentiaton and integration-SolutionA- Diff.docx
Define the processes of differentiaton and integration-SolutionA- Diff.docxDefine the processes of differentiaton and integration-SolutionA- Diff.docx
Define the processes of differentiaton and integration-SolutionA- Diff.docx
 
Describe methods of heat transfer- Give examples-Solutionthere are thr.docx
Describe methods of heat transfer- Give examples-Solutionthere are thr.docxDescribe methods of heat transfer- Give examples-Solutionthere are thr.docx
Describe methods of heat transfer- Give examples-Solutionthere are thr.docx
 
Depreciation expense is not a cash flow item but it will affect the ca.docx
Depreciation expense is not a cash flow item but it will affect the ca.docxDepreciation expense is not a cash flow item but it will affect the ca.docx
Depreciation expense is not a cash flow item but it will affect the ca.docx
 
Define a set of keywords sorted by relevance to related to the theme -.docx
Define a set of keywords sorted by relevance to related to the theme -.docxDefine a set of keywords sorted by relevance to related to the theme -.docx
Define a set of keywords sorted by relevance to related to the theme -.docx
 
Define mass- force- and weight- What are the SI and US units for each-.docx
Define mass- force- and weight- What are the SI and US units for each-.docxDefine mass- force- and weight- What are the SI and US units for each-.docx
Define mass- force- and weight- What are the SI and US units for each-.docx
 
Dean Holleman 2-1-15 818 PM Quiz- Ch- 1 Quiz Question 10 of 11 This Qu.docx
Dean Holleman 2-1-15 818 PM Quiz- Ch- 1 Quiz Question 10 of 11 This Qu.docxDean Holleman 2-1-15 818 PM Quiz- Ch- 1 Quiz Question 10 of 11 This Qu.docx
Dean Holleman 2-1-15 818 PM Quiz- Ch- 1 Quiz Question 10 of 11 This Qu.docx
 
Data Warehousing is in use everywhere- Discuss the advantages and disa.docx
Data Warehousing is in use everywhere- Discuss the advantages and disa.docxData Warehousing is in use everywhere- Discuss the advantages and disa.docx
Data Warehousing is in use everywhere- Discuss the advantages and disa.docx
 
Database Of the following data storage technologies- Permanent Data St.docx
Database Of the following data storage technologies- Permanent Data St.docxDatabase Of the following data storage technologies- Permanent Data St.docx
Database Of the following data storage technologies- Permanent Data St.docx
 

Recently uploaded

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
SoniaTolstoy
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Krashi Coaching
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 

Recently uploaded (20)

Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 

Define a structure called WeatherData to store the following weather d.docx

  • 1. Define a structure called WeatherData to store the following weather data: totalRainfall highTemp lowTemp aveTemp Declare an array of 12 structures to hold the weather data for an entire year. Assign memory to the array of structures with the new operator. Solution #include using namespace std; //Declaring structure struct WeatherData { float totalRainfall; float highTemp; float lowTemp; float aveTemp; }; int main() { //Memory assignment using new operator WeatherData *pointer = new WeatherData[12]; // Rest of program return 0; }