Table of Contents
show
Pointer Addition
Example
#include<stdio.h>
int main()
{
int *ptr = (int *) 2000;
printf("Initial value of ptr = %u\n",ptr);
ptr = ptr +3;
printf("Final value of ptr = %u",ptr);
return 0;
}
Output
Initial value of ptr = 2000
Final value of ptr = 2006
Views: 0