Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

solve it HW5: Function Overloading You are required to write two overloaded functions called NestedStatements that take in the following formal parameters list: - Function

solve it
image text in transcribed
HW5: Function Overloading You are required to write two overloaded functions called NestedStatements that take in the following formal parameters list: - Function 1: takes as input two strings (i.e. S1 and S2 ) and returns true if the string S1 appears in the string S2 at least once. Otherwise, the function returns false. For example, if S1 = "eat" and S2 = "the weather is nice" then the function returns TRUE. Similarly, if S1 = "zoo" and S2 = "the zoo is closed" then the function also returns TRUE. - Function 2: takes as input two strings (i.e. S1 and S2 ) and an integer reference variable count, and saves the number of times the string S1 appears in the string S2 in the variable count. For example, if S1 = "the" and S2 = "the weather is nice" then the value of count at the end of the function is 2. Similarly, if S1 = "cloned" and S2= "the zoo is closed" then the value of count at the end of the function is 0. Do not write and submit the main subroutine, or any include statments, these are already written and hidden from you. However, if you want to test your solution in any IDE (e.g., CodeBlocks, CLion, onlinegdb.com), then you will need to write your own main there for testing purposes

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions