How JustAnswer Works:
  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.
Ask LogicPro Your Own Question
LogicPro
LogicPro, Engineer
Category: Homework
Satisfied Customers: 12986
Experience:  Expert in Java C++ C C# VB Javascript Design SQL HTML
29751445
Type Your Homework Question Here...
LogicPro is online now
A new question is answered every 9 seconds

Assignment on Pointers and how to pass them to functions For

This answer was rated:

Assignment on Pointers and how to pass them to functions
For an example, you can refer to the source code on page 541.

Write a C++ program that would use a function to calculate the average for 5 tests taken by the student
The function should take two arguments, the first argument is a pointer to a double, the second argument is an integer that represents the number of elements in the array.

Inside main, declare an array of 5 doubles, populate the array at the run time via the key board, hint, use a for loop to ask for 5 test scores (0 to 100).
Once the array has been filled, declare a pointer of type double and make it point to the base of the array. Call the function, and pass the pointer to the function. The function should receive the pointer The function should use this pointer to find the sum and find the average of the 5 test scores and print the result.
Note: Finding the sum and the average should all take place inside the function . All main will do is to fill the array of testscores and pass a pointer that is pointing to this array to the called function.


Submit a copy of the source code plus a screen shot of the output result/run.
Hi,
Welcome back.
I got it, thank you.
I will provide you answer of this ASAP.
Let me know the deadline for this?
THIS ANSWER IS LOCKED!

You need to spend $3 to view this post. Add Funds to your account and buy credits.
LogicPro and other Homework Specialists are ready to help you
Hello Enes, How are you?
If you have other questions, you can post your questions using "For LogicPro Only" at the start of the question, it will ensure question comes to me.
I would be happy to help you.
Customer: replied 3 years ago.

 


Write a function named repalceSubstring. The function should accept three C-string or string object arguments. Let's call them string1, string2, and string3. It should search string1 for all occurrences of string2. When it finds an occurrence of string2, it should replace it with string3. For example, suppose the three arguments have the following values:


string1: "The dog jumped over the fence"


string2: "the"


string3: "that"


 


With these three arguments, the function would return a sting object with the value


"that dog jumped over that fence". Demonstrate the function in a complete program.


 


Include a screen shot showing the program compiles and runs with the output.


If the program does not compile, the screen shot should show the errors.


 


Note:


You can use getline to receive the string inputs from the keyboard,


 


you can use .find, .replace, etc... in the function replaceSubstring to accomplish the find and replace task.

Customer: replied 3 years ago.

i do have one assignment can you help for that ?

Sorry. I was offline.
I would be happy to help. Post that as a new question with suitable price using only "For logicpro only" as question text. once I reply on that page, you can copy paste the question
Goto following link
http://www.justanswer.com/homework/expert-logicpro/
to create the question under my profile
Customer: replied 3 years ago.
I just tired to submit it .. It already show up different tutor .. Not yours . Is that problem ?
Use only "For logicpro only" as question text even if it shows different expert.

Goto following link
http://www.justanswer.com/homework/expert-logicpro/
to create the question under my profile
Customer: replied 3 years ago.
It is long question I can't submit under the your name
Goto following link
http://www.justanswer.com/homework/expert-logicpro/
to create the question under my profile.

Use only "For logicpro only" as question text even if it shows different expert.

Once I reply, you can provide the id of uploaded files

Related Homework Questions