Tuesday, 19 August 2014

Assign Value Of Pointer In C

#include<stdio.h>
int main()
{
int num[2] = {10,20};
const int *ptr;

ptr = &num[0];

*ptr = 30;

printf("%d",*ptr);

return(0);
}

No comments:

Post a Comment