Pointer initialising

 #include <stdio.h>


int main()


{

    int x=10; 

    int *p = 0;

    p = &x;

    if ( p != 0){

        *p = 100;

        printf("%u is the memory address  of x\n %d is the  value at *p(x)\n %d is the alter value of x", p,*p , x);

        

    }else{

        printf("ERROR");

    }


    return 0;

}

Comments

Popular posts from this blog

Factors : using C

Cross shaped pattern

Factorial ! calculation