Hi everybody, I am pretty new to C programming, I do know Java, but now I've started with programming PIC processors. So Obviously I need to get familiar with pointers, which arent used in Java.
It's a fairly simple question, I needed a program to return an array, and I found the way how to do it on the internet. Of course most ppl would stop here and just be happy that it works, but I'd rather know how it works, seeing as it doesnt make sence to me.
In the following function, I give an array (int i) but the function asks for a pointer (int *i). Now I just don't get how it works? Could someone please explain me the way this works? Thank you.
Code:#include <stdio.h> int Functie(int *i); main() { int i[2]; Functie(i); printf("%d %d", i[0], i[1]); } int Functie(int * i){ /* Do something with i, for example: */ i[0] = 2; i[1] = 3; }