2

Possible Duplicate:
What do people find difficult about C pointers?

New to c programming (Actually new to programming in general). Well, I just can't get familiar with c pointers. maybe, I can use them in some situations, but really am stuck to understand it. Anyone been in such a situation? Any suggestions?

Community
  • 1
  • 1
user455566
  • 53
  • 4
  • 1
    You need to ask direct questions on Stackoverflow. But for your benefit, you would have to read some introductory book on C and then share your issues as to which section you don't understand. – Shamim Hafiz - MSFT Nov 04 '10 at 14:12
  • @Paul: It's close. but people there try to tell others what problems they ran into. The question author wants suggestions.so I don't think it's a duplicate. – Kamyar Nov 04 '10 at 14:12
  • 1
    belongs to http://programmers.stackexchange.com/ imo – mcabral Nov 04 '10 at 14:13
  • @gunner Sorry, new to stackoverflow. I just feel very confused about them. Wanted to know if anyone had the same issues and what's the best way to lean them – user455566 Nov 04 '10 at 14:14
  • 1
    pointers are similar to recursion - you either get it or you don't – KevinDTimm Nov 04 '10 at 14:18
  • @user I usually had to read the same book for several times to understand it, and pointers are tough. Have some patience :) – ruslik Nov 04 '10 at 14:20
  • @KevinDTimm: Good Point :) . Pointers and Recursion based questions are considered the highest level of C Interview question. The hardest of most Interview questions usually compose of elements of Pointers and Recursions together. – Shamim Hafiz - MSFT Nov 04 '10 at 14:24

2 Answers2

2

I would start at the Introduction to pointers. The link is to a very simple, concise, and easy to follow tutorial/e-learning site. The next chapter goes more in depth. I think you'll find the information helpful in getting a better understanding of how pointers work.

That site discusses things that can confuse people easily. Such as the following syntax differences:

1   int *pnPtr; // a pointer to an integer value
2   double *pdPtr; // a pointer to a double value
3    
4   int* pnPtr2; // also valid syntax
5   int * pnPtr3; // also valid syntax
Matt
  • 14,353
  • 5
  • 53
  • 65
1

Take a look at What do people find difficult about C pointers?. people discussed what fundamental issues they ran into when trying to learn c pointers.

Community
  • 1
  • 1
Kamyar
  • 18,639
  • 9
  • 97
  • 171