Autor: Edward Bartolo Datum: To: dng Betreff: Re: [DNG] Studying C as told. (For help)
Hi,
Now I have several exercises from "The C programming language"
(Kernighan & Ritchie). Some question look rather challenging...
I learnt arrays are always passed by reference to function calls. So,
I wrote the following program to make use of this so that a variable
in main() is modified in a function call.
Is this technique used?
The program:
--------------------------
#include <stdio.h>
void times2(int i[]) {
i[0] = 33;
}
int main () {
int a = 15;
printf("before function a = %d\n", a);