Horje
how to make a pointer point to a the last value in an array Code Example
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;
}




Cpp

Related
c++ namespace example Code Example c++ namespace example Code Example
sizeof’ on array function parameter ‘arr’ will return size of ‘int*’ [-Wsizeof-array-argument] Code Example sizeof’ on array function parameter ‘arr’ will return size of ‘int*’ [-Wsizeof-array-argument] Code Example
len in cpp Code Example len in cpp Code Example
pointer Code Example pointer Code Example
c++ power of two Code Example c++ power of two Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
10