Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

function to print elements from 2d array

void printElements(int* arr,int r,int c){
	for (int i = 0; i < r; ++i){
		for (int j = 0; j < c; ++j){
			cout<<( *((arr + i * c) + j))<<" ";
		}
		cout<<"
";
	}
	return;
}

// To call this function:
printElements(*array, row, column);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #function #print #elements #array
ADD COMMENT
Topic
Name
7+8 =