Question: Given the string variables str1 and str2, and str1 = Prairie View AM University; str2 = air; What is the result of each of the

Given the string variables str1 and str2, and

str1 = Prairie View AM University;

str2 = air;

What is the result of each of the following expressions?

1. str1.length()

2. str1.find(str2)

3. str1.substr(8, 4)

4. str1.substr(0, 7) + str2.substr(2, 1)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!