Search
 
SCRIPT & CODE EXAMPLE
 

CPP

punteros a arrays

// C++ program to demonstrate that compiler
// internally uses pointer arithmetic to access
// array elements.
#include <iostream>
using namespace std;
 
int main()
{
    int arr[] = { 100, 200, 300, 400 };
 
    // Compiler converts below to *(arr + 2).
    cout << arr[2] << " ";
 
    // So below also works.
    cout << *(arr + 2) << " ";
 
    return 0;
}
Comment

PREVIOUS NEXT
Code Example
Cpp :: c++ insertion in astack 
Cpp :: enqueue function with linked list implementation in c++ 
Cpp :: time function in c++ 
Cpp :: fibonacci sequence c++ 
Cpp :: semi colon in argument list c++ 
Cpp :: haxelib install cpp 
Cpp :: c++ thread id 
Cpp :: set keybinding for compiling c++ program in neovim 
Cpp :: c++ Unable to get CMake Tutorial example to compile 
Cpp :: txt auslesen c++ 
Cpp :: c++ cout format specifier for correct number of decimal points 
Cpp :: Extended Euclid Algorithm Recursive Solution 
Cpp :: find maximum contiguous Sub arrays 
Cpp :: operazioni aritmetiche c++ 
Cpp :: how to show c++ binary files in sublime text 
Cpp :: C++ with SVD 
Cpp :: MPI_Sendrecv 
Cpp :: std 
Cpp :: how to traverse string like array in cpp 
Cpp :: clang does not recognize std::cout 
Cpp :: arrays to function c++ 
Cpp :: get player pawn 
Cpp :: android call custom managed method from native code 
Cpp :: frc limelight tracking 
Cpp :: tutti i tipi di equazioni trigonometriche 
Cpp :: c++ struktura kolejki 
Cpp :: auto i cpp 
Cpp :: c++ variables 
Cpp :: C++ Assignment Operators 
Cpp :: read from standard input cpp 
ADD CONTENT
Topic
Content
Source link
Name
5+5 =