On Wed, 22 Jun 2016 11:15:44 +0200 Edward Bartolo <edb...@gmail.com> wrote:
> The program: > -------------------------- > #include <stdio.h> > > void times2(int i[]) { > i[0] = 33; > } Others have commented on value and reference. What I have to add is this: Always take special care to name functions and variables descriptively. For instance, either you should rename times2() set_to_33(), or in its body you should put: i[0] = i[0] * 2; I wrote about readability here: http://troubleshooters.com/tpromag/199908/index.htm SteveT Steve Litt June 2016 featured book: Troubleshooting: Why Bother? http://www.troubleshooters.com/twb _______________________________________________ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng