Purchase Solution

A simple example of two-dimensional arrays in C

Not what you're looking for?

Ask Custom Question

Write a C function that adds the values of all elements in a two-dimensional array that is passed to the function, Assume that the array is an array of double-precision numbers having 4 rows and 5 columns.

Purchase this Solution

Solution Summary

This solutions provides a simple and easy to understand example of how to use nested for loops to iterate over all of the elements of a two-dimensional array in C. It currently sums up all of the elements in the array but it can easily be extended to do other things with the elements of a two-dimensional array.

Solution Preview

The simplest way to sum up all of the elements of an array is to use a for loop to iterate over all of the elements. For a two dimensional array two for loops ...

Purchase this Solution


Free BrainMass Quizzes
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.

Basic Computer Terms

We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.

C++ Operators

This quiz tests a student's knowledge about C++ operators.

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.