Using Pointers and Functions - C Pointer

C examples for Pointer:Pointer Variable

Description

Using Pointers and Functions

Demo Code

#include <stdio.h>

void test (int *int_pointer){
    *int_pointer = 100;
}

int main (void){
    void test (int *int_pointer);
    int i = 5, *p = &i;

    printf ("Before the call to test i = %i\n", i);

    test (p);/*from   w  w w  .j a  va 2  s. c  o  m*/

    printf ("After the call to test i = %i\n", i);

    return 0;
}

Result


Related Tutorials