113. Understanding constant and read only pointer.

 #include<stdio.h>

const int *ip;// Cant change value of ip --- Read Only Pointer

int *const ip1; // Cant change address of ip1 --- Constant Pointer

const int *const ip2;// Cant change address or value of ip2 - Read only Constant Pointer

int i=100,k;

void main()

{

        *ip=200;

        ip1=&k;

        *ip2=200;

        ip2=&k;

}

Comments