Search
 
SCRIPT & CODE EXAMPLE
 

CPP

how to point to next array using pointer c++

#include <iostream>
using namespace std;
int main() {
   int arr[5] = {1, 2, 3, 4, 5};
   int *ptr = &arr[0];
   cout<<"The values in the array are: ";
   for(int i = 0; i < 5; i++) {
      cout<< *ptr <<" ";
      ptr++;
   }
   return 0;
}
Comment

PREVIOUS NEXT
Code Example
Cpp :: how to save system function output into a variable in c++ 
Cpp :: cpp stacks 
Cpp :: Polycarp found a rectangular table consisting of n rows and m columns. He noticed that each cell of the table has its number, obtained by the following algorithm "by columns": codeforces solution 
Cpp :: cpp pointer to two dimensional array 
Cpp :: c++ click event 
Cpp :: && in cpp 
Cpp :: how to use run total in C++ 
Cpp :: how initilaize deffult value to c++ class 
Cpp :: how to add values in empty array using python 
Cpp :: hamming c++ 
Cpp :: set the jth bit from 1 to 0 
Cpp :: Data Encapsulation in C++ 
Cpp :: for llop in c++ 
Cpp :: MPI_PUT 
Cpp :: c++ comments 
Cpp :: how to change the default camera speed values opengl 
Cpp :: easy way to learn file handling in c++ array 
Cpp :: print the elements of the array without using the [] notation in c++ 
Cpp :: break input stream into words 
Cpp :: c++ How can I make a std::vector of function pointers 
Cpp :: no argument but return value in c++ 
Cpp :: https://www.google 
Cpp :: c++ fps sleep while loop 
Cpp :: cpp console progressbar 
Cpp :: // A C++ program to show that we can use reference to 
Cpp :: how to find the mean and standard deviation of trqiing dataset in pytorch 
Cpp :: sort sub vector, sort range of vector c++ 
Cpp :: void does not a name a type in cpp 
Cpp :: cuda atomic swap 
Cpp :: c++ & operator 
ADD CONTENT
Topic
Content
Source link
Name
8+5 =