Example of passing reference parameters in C language

Example of passing reference parameters in C language
// Pay attention :
void func(int *para){
  (*para)++; // Since the reference address is used, the value of a in the main function is modified  
}

int main () {
    int a = 9;
    func(&a); // A reference address is passed
    printf("a: %d\n", a);
    
    return 0;
}
Sou‮www:ecr‬.lautturi.com
Created Time:2017-08-29 09:46:50  Author:lautturi