Recommendation for some books for in-depth knowledge of pointers, multi-dimensional arrays, recursions . (In c/c++)
-
I have the basic level knowledge of pointers, arrays and recursion's. But i it is really confusing and hard to implement in programming, like when returning a multi-dimensional array from a user-defined function to the main, and problems like that. I surfed through the net but did not get enough questions to practice these concepts neither did get any books that i can practice from. So it would be really helpful if i can get some recommendations for the books or even websites from where i can practice. THANK YOU.
-
I have the basic level knowledge of pointers, arrays and recursion's. But i it is really confusing and hard to implement in programming, like when returning a multi-dimensional array from a user-defined function to the main, and problems like that. I surfed through the net but did not get enough questions to practice these concepts neither did get any books that i can practice from. So it would be really helpful if i can get some recommendations for the books or even websites from where i can practice. THANK YOU.
-
I have the basic level knowledge of pointers, arrays and recursion's. But i it is really confusing and hard to implement in programming, like when returning a multi-dimensional array from a user-defined function to the main, and problems like that. I surfed through the net but did not get enough questions to practice these concepts neither did get any books that i can practice from. So it would be really helpful if i can get some recommendations for the books or even websites from where i can practice. THANK YOU.
Tarun Jha wrote:
...like when returning a multi-dimensional array from a user-defined function...
The issue you may be having is you are searching for something very specific. Broaden your search. Instead of searching for a two- or three-dimension array, just focus on arrays in general. Visually, you might look at them something like:
// one 'row' with five items
int arr[5]; // [0][1][2][3][4]// three 'rows' with five items each
int arr[3][5]; // [0] - [0][1][2][3][4]
// [1] - [0][1][2][3][4]
// [2] - [0][1][2][3][4]// two 'levels' of three 'rows' with five items each
int arr[2][3][5]; // [0] - [0] - [0][1][2][3][4]
// [0] - [1] - [0][1][2][3][4]
// [0] - [2] - [0][1][2][3][4]// \[1\] - \[0\] - \[0\]\[1\]\[2\]\[3\]\[4\] // \[1\] - \[1\] - \[0\]\[1\]\[2\]\[3\]\[4\] // \[1\] - \[2\] - \[0\]\[1\]\[2\]\[3\]\[4\]
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
-
I have the basic level knowledge of pointers, arrays and recursion's. But i it is really confusing and hard to implement in programming, like when returning a multi-dimensional array from a user-defined function to the main, and problems like that. I surfed through the net but did not get enough questions to practice these concepts neither did get any books that i can practice from. So it would be really helpful if i can get some recommendations for the books or even websites from where i can practice. THANK YOU.
They're all pointers, and pointers are simply an address in memory. Everyone is different, but for me, the best way to really understand a C++ concept is to write a small console program and experiment using the scientific method--that is, I hypothesize how something should work, write simple code to test that hypothesis and refine. (Sometimes, I open a disassembly view in debug mode, but that may understandably be even more confusing for many.) Edit: A word of warning. Don't return a pointer to an object allocated on the called function's stack. While the data it points to may be valid immediately after the call, it will likely become corrupt with the next function call.