Skip to Main Content
Introduction to Computational Modeling Using C and Open-Source Tools
book

Introduction to Computational Modeling Using C and Open-Source Tools

by Jose M. Garrido
November 2013
Intermediate to advanced content levelIntermediate to advanced
461 pages
12h 1m
English
CRC Press
Content preview from Introduction to Computational Modeling Using C and Open-Source Tools
122 Introduction to Computational Modeling
j,
*
intptr);
11 intptr++; /
*
point to next element of array myarray
*
/
12 }
13 return 0;
14 } /
*
end function main
*
/
After compiling, linking, and executing the program, the following output is dis-
played:
$ gcc -Wall incrptr.c
$ ./a.out
Current element: 0 value: 10
Current element: 1 value: 20
Current element: 2 value: 30
Current element: 3 value: 40
Current element: 4 value: 50
9.8 Arrays as Pointers
In the previous section it was shown that an array can be manipulated as a pointer.
This is useful when using array parameters and when an array is the return value in
a function.
9.8.1 Pointer Parameters for Arrays
An array ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Computer Fundamentals and Programming in C (RMK)

Computer Fundamentals and Programming in C (RMK)

Anita Goel, Ajay Mittal

Publisher Resources

ISBN: 9781482216783