CHAPTER

7

One-Dimensional Arrays

7.1 One-Dimensional Arrays

7.2 Input of One-Dimensional Arrays

7.3 Output of One-Dimensional Arrays

7.4 Manipulation of Arrays

7.5 Passing Arrays to Functions

7.6 Sample Programs

Chapter Summary

Exercises

Objectives

To store and manipulate data aggregates of homogeneous type. In science and engineering they are vectors in the form of lists.

There are many applications in science and engineering that require complex data types. The simple built-in data types int, float, double, and char presented in Chapter 2 are inadequate for complex applications. In C one can derive data types such as arrays from the basic data types. A one-dimensional array is used to store a collection of homogeneous data that can be arranged ...

Get C Programming for Scientists and Engineers with Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.