Purchase Solution

C passing parameter by reference

Not what you're looking for?

Ask Custom Question

Need a C program that has a declaration in main () to store the following numbers into an array named rates:2.3,3.3,4.4,5.5,6.0. There should be a function call to show () that accepts rates in a parameter named rates and then displays the numbers using the pointer notation *(rates + i).

Purchase this Solution

Solution Summary

How a program can be created so that
1. Declares and stores four(4) real numbers.
2. Calls another function called show() which
2a. Accepts the parameter named rates and
2b. Displays the parameter ( the array in main() ) by some print function and using pointer notation *(rates+i)
You require an understanding of pointers and how to pass and receive parameter by reference in order to solve this fairly straightforward problem.

Solution Preview

If I understand correctly, you are asking how a program can be created that
1. Declares and stores four(4) real numbers.
2. Calls another function called show() which
2a. Accepts the parameter named rates and
2b. Displays the parameter ( the array in main() ) by some print function and using pointer notation *(rates+i)
You require an understanding of pointers and how to pass and receive parameter by reference in order to solve this fairly straightforward problem.

Please understand that under Brainmass guidelines I am prevented from giving you a straightforward result or solution. However I can provide you with snippets of code examples that will show you how to deal with pointers in a function. I will also like to keep the given ...

Purchase this Solution


Free BrainMass Quizzes
Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.

Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.

Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.

Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.

Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.