Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

how to make a pointer point to a the last value in an array

#include <stdio.h>

int main( void )
{
    int a[4] = { 0, 1, 2, 3, };

    int *p = (int *)(&a + 1) - 1;

    return 0;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #pointer #point #array
ADD COMMENT
Topic
Name
7+6 =