Answer to Question #24227 in C++ for chandra prakash

Question #24227
write a function in c++ which accepts a 2D array of integer and its size as arguments and displays the elements of middle row and the middle column
1
Expert's answer
2013-02-13T08:35:46-0500
void f(int **a, int length){
& for (int i = 0 ; i < length ; i++){
cout<<a[length/2][i]<<' ';
& } cout<<endl;
& for (int i = 0 ; i < length ; i++){
cout<<a[i][length/2]<<' ';
& }&
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS