Search
 
SCRIPT & CODE EXAMPLE
 

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;
}
Comment

PREVIOUS NEXT
Code Example
Cpp :: how to insert in a queue c++ 
Cpp :: c++ create function pointer 
Cpp :: how we can write code to remove a character in c++ 
Cpp :: Basic Makefile C++ 
Cpp :: C++ function inside main 
Cpp :: tower of hanoi 
Cpp :: tr bash 
Cpp :: Array Rotate in c++ 
Cpp :: << in C++ 
Cpp :: print all subsequences 
Cpp :: queue 
Cpp :: unordered_map in c++ 
Cpp :: create a copy of a vector c++ 
Cpp :: ifstream file (“code2.txt”); dev C++ 
Cpp :: C++ CHEAT SHEAT 
Cpp :: c++ throw index out of bound 
Cpp :: the amount of input is unknown 
Cpp :: check if a string is a prefix of another c++ 
Cpp :: Road sign detection and recognition by OpenCV in c 
Cpp :: what is c++ 
Cpp :: c++ to mips converter online 
Cpp :: convert c++ to mips 
Cpp :: function param pointer to struct prototype in c 
Cpp :: c++ conditional typedef 
Cpp :: c++ reverse bits 
Cpp :: c++ sort numbers by magnitude/absolute value 
Cpp :: c++ arrays 
Cpp :: punteros a arrays 
Cpp :: c++ watch a variable 
Cpp :: how to calculate marks in C++ 
ADD CONTENT
Topic
Content
Source link
Name
7+8 =