SlideShare a Scribd company logo
1 of 1
Download to read offline
Write a function that takes as parameters two vectors of strings, the first populated, the second
being initially empty. In the first parameter, some elements of the vector will be names in the
format FirstName LastName (i.e. they consist of two names separated by a single space), while
some elements will consist only of a first name. The function will construct a second vector
holding First Names only. This is a void function, to be called compileFirstnames; both
parameters are passed by reference; use the const modifier as appropriate. Finally, write a
statement invoking the function, passing in previously declared vectors names (populated with
names as indicated above), and firstNames (initially empty).

More Related Content

More from amanstudio07860

Write an application that ask the user to enter 2 integers, obtains.pdf
 Write an application that ask the user to enter 2 integers, obtains.pdf Write an application that ask the user to enter 2 integers, obtains.pdf
Write an application that ask the user to enter 2 integers, obtains.pdfamanstudio07860
 
Write a single C statement that corresponds to the two MIPS assembly .pdf
 Write a single C statement that corresponds to the two MIPS assembly .pdf Write a single C statement that corresponds to the two MIPS assembly .pdf
Write a single C statement that corresponds to the two MIPS assembly .pdfamanstudio07860
 
Write a recursive function elemAt that returns the ith item of the li.pdf
 Write a recursive function elemAt that returns the ith item of the li.pdf Write a recursive function elemAt that returns the ith item of the li.pdf
Write a recursive function elemAt that returns the ith item of the li.pdfamanstudio07860
 
Write a recursive function flip that takes a list of pairs, and retu.pdf
 Write a recursive function flip that takes a list of pairs, and retu.pdf Write a recursive function flip that takes a list of pairs, and retu.pdf
Write a recursive function flip that takes a list of pairs, and retu.pdfamanstudio07860
 
Write a Python module called inches2centimeters that will accept one .pdf
 Write a Python module called inches2centimeters that will accept one .pdf Write a Python module called inches2centimeters that will accept one .pdf
Write a Python module called inches2centimeters that will accept one .pdfamanstudio07860
 
Write a Python program that can perform the following operations on a.pdf
 Write a Python program that can perform the following operations on a.pdf Write a Python program that can perform the following operations on a.pdf
Write a Python program that can perform the following operations on a.pdfamanstudio07860
 
Write a program that stores integers in a linked list. Please refer t.pdf
 Write a program that stores integers in a linked list. Please refer t.pdf Write a program that stores integers in a linked list. Please refer t.pdf
Write a program that stores integers in a linked list. Please refer t.pdfamanstudio07860
 
Write a program that creates 2 Lists. The first is the list of names .pdf
 Write a program that creates 2 Lists. The first is the list of names .pdf Write a program that creates 2 Lists. The first is the list of names .pdf
Write a program that creates 2 Lists. The first is the list of names .pdfamanstudio07860
 
Write a program that implements a function. The function should creat.pdf
 Write a program that implements a function. The function should creat.pdf Write a program that implements a function. The function should creat.pdf
Write a program that implements a function. The function should creat.pdfamanstudio07860
 
Write a program named ArrayDemo that stores an array of 10 integers. .pdf
 Write a program named ArrayDemo that stores an array of 10 integers. .pdf Write a program named ArrayDemo that stores an array of 10 integers. .pdf
Write a program named ArrayDemo that stores an array of 10 integers. .pdfamanstudio07860
 
Write a Java program to represent a family tree. A sample family tree.pdf
 Write a Java program to represent a family tree. A sample family tree.pdf Write a Java program to represent a family tree. A sample family tree.pdf
Write a Java program to represent a family tree. A sample family tree.pdfamanstudio07860
 
Worksheet No. 3 - Upper left side of the worksheet, prepare the State.pdf
 Worksheet No. 3 - Upper left side of the worksheet, prepare the State.pdf Worksheet No. 3 - Upper left side of the worksheet, prepare the State.pdf
Worksheet No. 3 - Upper left side of the worksheet, prepare the State.pdfamanstudio07860
 
Wones Trading Card Inventory Purchases On April 15, Wong sells 4,000.pdf
 Wones Trading Card Inventory Purchases On April 15, Wong sells 4,000.pdf Wones Trading Card Inventory Purchases On April 15, Wong sells 4,000.pdf
Wones Trading Card Inventory Purchases On April 15, Wong sells 4,000.pdfamanstudio07860
 
With FOB+DA+ shipping as the terms of trade, a group of two people t.pdf
 With FOB+DA+ shipping as the terms of trade, a group of two people t.pdf With FOB+DA+ shipping as the terms of trade, a group of two people t.pdf
With FOB+DA+ shipping as the terms of trade, a group of two people t.pdfamanstudio07860
 
With careful auscultation, vou can often detect splitting of the hear.pdf
 With careful auscultation, vou can often detect splitting of the hear.pdf With careful auscultation, vou can often detect splitting of the hear.pdf
With careful auscultation, vou can often detect splitting of the hear.pdfamanstudio07860
 
Wildhorse Inc. issued $928,000 of 10 -year, 3 bonds on January 1,202.pdf
 Wildhorse Inc. issued $928,000 of 10 -year, 3 bonds on January 1,202.pdf Wildhorse Inc. issued $928,000 of 10 -year, 3 bonds on January 1,202.pdf
Wildhorse Inc. issued $928,000 of 10 -year, 3 bonds on January 1,202.pdfamanstudio07860
 
Wildhorse Ltd. is a private company reporting under ASPE. Its income .pdf
 Wildhorse Ltd. is a private company reporting under ASPE. Its income .pdf Wildhorse Ltd. is a private company reporting under ASPE. Its income .pdf
Wildhorse Ltd. is a private company reporting under ASPE. Its income .pdfamanstudio07860
 
Write a function that will ask the user to enter the price of a commo.pdf
 Write a function that will ask the user to enter the price of a commo.pdf Write a function that will ask the user to enter the price of a commo.pdf
Write a function that will ask the user to enter the price of a commo.pdfamanstudio07860
 
Write a java code to construct an AVL tree by inserting the following.pdf
 Write a java code to construct an AVL tree by inserting the following.pdf Write a java code to construct an AVL tree by inserting the following.pdf
Write a java code to construct an AVL tree by inserting the following.pdfamanstudio07860
 
Why was Pluto demoted to a Dwart Planet What is required of a celest.pdf
 Why was Pluto demoted to a Dwart Planet What is required of a celest.pdf Why was Pluto demoted to a Dwart Planet What is required of a celest.pdf
Why was Pluto demoted to a Dwart Planet What is required of a celest.pdfamanstudio07860
 

More from amanstudio07860 (20)

Write an application that ask the user to enter 2 integers, obtains.pdf
 Write an application that ask the user to enter 2 integers, obtains.pdf Write an application that ask the user to enter 2 integers, obtains.pdf
Write an application that ask the user to enter 2 integers, obtains.pdf
 
Write a single C statement that corresponds to the two MIPS assembly .pdf
 Write a single C statement that corresponds to the two MIPS assembly .pdf Write a single C statement that corresponds to the two MIPS assembly .pdf
Write a single C statement that corresponds to the two MIPS assembly .pdf
 
Write a recursive function elemAt that returns the ith item of the li.pdf
 Write a recursive function elemAt that returns the ith item of the li.pdf Write a recursive function elemAt that returns the ith item of the li.pdf
Write a recursive function elemAt that returns the ith item of the li.pdf
 
Write a recursive function flip that takes a list of pairs, and retu.pdf
 Write a recursive function flip that takes a list of pairs, and retu.pdf Write a recursive function flip that takes a list of pairs, and retu.pdf
Write a recursive function flip that takes a list of pairs, and retu.pdf
 
Write a Python module called inches2centimeters that will accept one .pdf
 Write a Python module called inches2centimeters that will accept one .pdf Write a Python module called inches2centimeters that will accept one .pdf
Write a Python module called inches2centimeters that will accept one .pdf
 
Write a Python program that can perform the following operations on a.pdf
 Write a Python program that can perform the following operations on a.pdf Write a Python program that can perform the following operations on a.pdf
Write a Python program that can perform the following operations on a.pdf
 
Write a program that stores integers in a linked list. Please refer t.pdf
 Write a program that stores integers in a linked list. Please refer t.pdf Write a program that stores integers in a linked list. Please refer t.pdf
Write a program that stores integers in a linked list. Please refer t.pdf
 
Write a program that creates 2 Lists. The first is the list of names .pdf
 Write a program that creates 2 Lists. The first is the list of names .pdf Write a program that creates 2 Lists. The first is the list of names .pdf
Write a program that creates 2 Lists. The first is the list of names .pdf
 
Write a program that implements a function. The function should creat.pdf
 Write a program that implements a function. The function should creat.pdf Write a program that implements a function. The function should creat.pdf
Write a program that implements a function. The function should creat.pdf
 
Write a program named ArrayDemo that stores an array of 10 integers. .pdf
 Write a program named ArrayDemo that stores an array of 10 integers. .pdf Write a program named ArrayDemo that stores an array of 10 integers. .pdf
Write a program named ArrayDemo that stores an array of 10 integers. .pdf
 
Write a Java program to represent a family tree. A sample family tree.pdf
 Write a Java program to represent a family tree. A sample family tree.pdf Write a Java program to represent a family tree. A sample family tree.pdf
Write a Java program to represent a family tree. A sample family tree.pdf
 
Worksheet No. 3 - Upper left side of the worksheet, prepare the State.pdf
 Worksheet No. 3 - Upper left side of the worksheet, prepare the State.pdf Worksheet No. 3 - Upper left side of the worksheet, prepare the State.pdf
Worksheet No. 3 - Upper left side of the worksheet, prepare the State.pdf
 
Wones Trading Card Inventory Purchases On April 15, Wong sells 4,000.pdf
 Wones Trading Card Inventory Purchases On April 15, Wong sells 4,000.pdf Wones Trading Card Inventory Purchases On April 15, Wong sells 4,000.pdf
Wones Trading Card Inventory Purchases On April 15, Wong sells 4,000.pdf
 
With FOB+DA+ shipping as the terms of trade, a group of two people t.pdf
 With FOB+DA+ shipping as the terms of trade, a group of two people t.pdf With FOB+DA+ shipping as the terms of trade, a group of two people t.pdf
With FOB+DA+ shipping as the terms of trade, a group of two people t.pdf
 
With careful auscultation, vou can often detect splitting of the hear.pdf
 With careful auscultation, vou can often detect splitting of the hear.pdf With careful auscultation, vou can often detect splitting of the hear.pdf
With careful auscultation, vou can often detect splitting of the hear.pdf
 
Wildhorse Inc. issued $928,000 of 10 -year, 3 bonds on January 1,202.pdf
 Wildhorse Inc. issued $928,000 of 10 -year, 3 bonds on January 1,202.pdf Wildhorse Inc. issued $928,000 of 10 -year, 3 bonds on January 1,202.pdf
Wildhorse Inc. issued $928,000 of 10 -year, 3 bonds on January 1,202.pdf
 
Wildhorse Ltd. is a private company reporting under ASPE. Its income .pdf
 Wildhorse Ltd. is a private company reporting under ASPE. Its income .pdf Wildhorse Ltd. is a private company reporting under ASPE. Its income .pdf
Wildhorse Ltd. is a private company reporting under ASPE. Its income .pdf
 
Write a function that will ask the user to enter the price of a commo.pdf
 Write a function that will ask the user to enter the price of a commo.pdf Write a function that will ask the user to enter the price of a commo.pdf
Write a function that will ask the user to enter the price of a commo.pdf
 
Write a java code to construct an AVL tree by inserting the following.pdf
 Write a java code to construct an AVL tree by inserting the following.pdf Write a java code to construct an AVL tree by inserting the following.pdf
Write a java code to construct an AVL tree by inserting the following.pdf
 
Why was Pluto demoted to a Dwart Planet What is required of a celest.pdf
 Why was Pluto demoted to a Dwart Planet What is required of a celest.pdf Why was Pluto demoted to a Dwart Planet What is required of a celest.pdf
Why was Pluto demoted to a Dwart Planet What is required of a celest.pdf
 

Recently uploaded

Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
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.pptxheathfieldcps1
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterMateoGardella
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...KokoStevan
 

Recently uploaded (20)

Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
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"
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
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
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
 

Write a function that takes as parameters two vectors of strings, the.pdf

  • 1. Write a function that takes as parameters two vectors of strings, the first populated, the second being initially empty. In the first parameter, some elements of the vector will be names in the format FirstName LastName (i.e. they consist of two names separated by a single space), while some elements will consist only of a first name. The function will construct a second vector holding First Names only. This is a void function, to be called compileFirstnames; both parameters are passed by reference; use the const modifier as appropriate. Finally, write a statement invoking the function, passing in previously declared vectors names (populated with names as indicated above), and firstNames (initially empty).