[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 191
  • Last Modified:

Learning a tutorial but memorizing a keep concept instead of understanding

I am doing self study on pointers using c language.
I am now learning 2d arrays

where
B[e][J]=*(B[e]+j)
          =*(*(B+e)+j)

I think I am memorizing
B[e]=*(B+e)

Do you think I should just start the tutorials from the beginning?
0
rgb192
Asked:
rgb192
2 Solutions
 
phoffricCommented:
Good to memorize valid facts to help you program. If you are interested in professional job in C projects, that will not get you very far. Writing perfect code is rare, so you have to debug. Debugging C programs requires clear understanding of how the code translates into the memory.

I think you said your have this book: http://www.amazon.com/C-Programming-Language-2nd/dp/0131103628/ref=sr_1_1?ie=UTF8&qid=1408905909&sr=8-1&keywords=k%26r+ansi+c

If so, you can skip the first chapter which gives an overview and go into the details with understanding. (But I don't remember whether the subsequent chapters refer in any way back to chapter 1; in which case, you will have to read at least parts of Chapter 1.)

The hardest part of C, IMO, is pointers and multidimensional pointers.
0
 
historychefCommented:
As a former C programming instructor who has led hundreds of students through the complexities of pointers, let me give you my advice: Draw pictures of the layout of memory. Use boxes for memory locations and arrows to indicate pointers. You don't have to be an artist to do this -- the crudest drawing will do -- but DO IT. Eventually, you will understand what the pointers mean and you won't have to simply memorize equivalences (although the one you gave is correct). This is essential when you start dealing with pointers to pointers (a common structure for implementing a multidimensional array). phoffric is absolutely right about the need to understand what's going on in the machine to debug your programs.
0
 
rgb192Author Commented:
okay pointers are difficult and I should start with basics of c instead of starting with c pointers.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now