The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 398 Weeks Ago, 3 Days Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
a. Write a program that has a declaration in main ( ) to store the following numbers into an array named rates: 6.5,7.2,7.5,8.3,8.6,9.4,9.6,9.8,10.0. There should be a function call to show ( ) that accepts rates in an argument named rates and then displays the numbers using the pointer notation * (rat e s + i).
Â
b. Modify the show ( ) function written in Exercise 6a to alter the address in rates.
Exercise 6a
a. Write a program that has a declaration in main ( ) to store the following numbers into an array named rates: 6.5,7.2,7.5,8.3,8.6,9.4,9.6,9.8,10.0. There should be a function call to show ( ) that accepts rates in an argument named rates and then displays the numbers using the pointer notation * (rat e s + i).
Use the expression *rates++ rather than * (rates + i) to retrieve the correct element.
Hel-----------lo -----------Sir-----------/Ma-----------dam----------- Â----------- Th-----------ank----------- Yo-----------u f-----------or -----------usi-----------ng -----------our----------- we-----------bsi-----------te -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill-----------