473,889 Members | 1,431 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

"Mastering C Pointers"....

Hey guys, I'm new here, just a simple question.

I'm learning to Program in C, and I was recommended a book called,
"Mastering C Pointers", just asking if any of you have read it,
and if it's worth the $25USD.

I'm just looking for a book on Pointers, because from what I've
read it's one of the toughest topics to understand.

thanks in advanced.

sincerely ... Andy
Nov 13 '05
388 21994
On Tue, 04 Nov 2003 08:33:13 -0600, in comp.lang.c , Ed Morton
<mo************ ****@lucent.com > wrote:
Mark McIntyre wrote:
<snip>
By the way, are you also known as roose? I'm suspicious of your sudden
appearance in this thread, and your evident agreement with a troll.
Apologies if I'm maligining you but you see my point?


Alan has been posting to the comp.unix.quest ions and comp.unix.shell
newsgroups for a while now, and I've never seen Roose in either. A
couple of months back Alan mentioned in one that he was interested in
learning C so I suggested he lurk in comp.lang.c for a few weeks to get
a feel for the group and its participants before posting anything.


Thats fair enough.
--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.angelfire.c om/ms3/bchambless0/welcome_to_clc. html>
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Nov 13 '05 #221
Mark McIntyre <ma**********@s pamcop.net> wrote:
On Tue, 04 Nov 2003 22:29:03 GMT, in comp.lang.c , Alan Connor
<zz****@xxx.yyy > wrote:
<snip>
If only you stopped there, which you obviously don't. Another lie.


Okay, enough. You're either a total idiot, or you're a troll.


Apparently he's both, see below.
Only one or the other would call Keith Thompson AND Richard Heathfield
liars within a single post. For our amusement as much as your own
enlightenment, you might want to google for the history of their
posts,
I had some spare time and did a quick google groups search. If you're
only interested in the highlights, do a search for threads that have his
name in the _subject-line_. For the full load perform a search for
articles he posted. It's real fun.

<snip>
And I think you are a liar, and am sick of this continued smear campaign
against Roose.


You /are/ roose. I claim my five pounds.


I still don't think so.
*plonk*


And miss the fun? Naw...
--
Irrwahn
(ir*******@free net.de)
Nov 13 '05 #222

On Wed, 5 Nov 2003, pete wrote:

Mark McIntyre wrote:
Richard Heathfield <do******@addre ss.co.uk.invali d> wrote:
Sheldon Simms wrote:
>
> Ok, let me try to tell you something about pointers that is
> (hopefully) precisely correct, but won't confuse you.
>
> A pointer is a kind of variable that can "point to" some object.

This isn't precisely correct. Sorry to dash your hopes.

A pointer need not be variable. For example, there exists such a thing
as a null pointer constant.


And of course a null pointer is a pointer that doesn't point to
anythin.... So can we settle on "a pointer is an object that can probably point to
another object, or possibly to a function, which is possibly not an
object, ouch my head hurts"?


A pointer doesn't have to be an object.
A pointer could also be the address of an object.


A pointer *is* either the address of an object, or the address
of a function, or the null pointer constant.

A pointer *may* not be an object, but it always is a *value*.
For example, (my_array+1) is not an object, nor is it a null
pointer, but it is still an expression of pointer type.
To be really clear (which I suppose one must), one should really
speak of "objects of pointer type" and "expression s of pointer
type." I don't think the Standard assigns any meaning to the
noun "pointer" itself, except as a kind of shorthand for
"object of pointer type" or "expression of pointer type." Just
like it doesn't make sense to speak of "a short int;" you can
speak of "an object of type 'short int'" or "a value of type
'short int'," but they're two different things whose only
commonality is their type.
-Arthur,
obviously *not* Roose
Nov 13 '05 #223
pete <pf*****@mindsp ring.com> writes:
Mark McIntyre wrote:
So can we settle on "a pointer is an object that can probably point to
another object, or possibly to a function, which is possibly not an
object, ouch my head hurts"?


A pointer doesn't have to be an object.
A pointer could also be the address of an object.


The distinction here is between pointer objects and pointer values. A
pointer object can hold a pointer value. A pointer value is also
known as an address.

--
Keith Thompson (The_Other_Keit h) ks*@cts.com <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://www.sdsc.edu/~kst>
Schroedinger does Shakespeare: "To be *and* not to be"
Nov 13 '05 #224
pete <pf*****@mindsp ring.com> wrote:
Mark McIntyre wrote:

And are functions objects?


No.
So can we settle on "a pointer is an object that can probably point to
another object, or possibly to a function, which is possibly not an
object, ouch my head hurts"?


A pointer doesn't have to be an object.
A pointer could also be the address of an object.


To dissolve this ambiguity one could differentiate between "pointer
variables" (which represent objects that can hold pointer values) and
"pointer values" which are ... err ... pointer values :)
--
Irrwahn
(ir*******@free net.de)
Nov 13 '05 #225
Irrwahn Grausewitz <ir*******@free net.de> writes:
Mark McIntyre <ma**********@s pamcop.net> wrote:

[...]
Only one or the other would call Keith Thompson AND Richard Heathfield
liars within a single post. For our amusement as much as your own
enlightenment, you might want to google for the history of their
posts,


I had some spare time and did a quick google groups search. If you're
only interested in the highlights, do a search for threads that have his
name in the _subject-line_. For the full load perform a search for
articles he posted. It's real fun.


Does this refer to Richard or to me? If it's to me, be aware that the
UFO guy is a different Keith Thompson.

--
Keith Thompson (The_Other_Keit h) ks*@cts.com <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://www.sdsc.edu/~kst>
Schroedinger does Shakespeare: "To be *and* not to be"
Nov 13 '05 #226
Alan Connor wrote:

What I would like to see is one un-corrected, in-context statement by
Roose that if accepted by a novice as the whole picture for a *while*
would result in them being unable to ever program effectively in C.

Because *that* is what so many people are accusing him of,
I don't believe you. Please provide evidence to support that assertion.
and I think
that this is an outrageous and malicious exaggeration, at BEST.


Indeed it is, in common with several other of your recent articles. You owe
several people on this newsgroup an apology.

--
Richard Heathfield : bi****@eton.pow ernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton
Nov 13 '05 #227
On Wed, 05 Nov 2003 00:28:42 GMT, in comp.lang.c , pete
<pf*****@mindsp ring.com> wrote:
Mark McIntyre wrote:
So can we settle on "a pointer is an object that can probably point to
another object, or possibly to a function, which is possibly not an
object, ouch my head hurts"?
A pointer doesn't have to be an object.


I feel pretty comfortable that a pointer has to be an object.
Otherwise how could you point to it?
A pointer could also be the address of an object.


It might *contain* that, but it itself must be an object. I think....

--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.angelfire.c om/ms3/bchambless0/welcome_to_clc. html>
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Nov 13 '05 #228
Mark McIntyre wrote:

On Wed, 05 Nov 2003 00:28:42 GMT, in comp.lang.c , pete
<pf*****@mindsp ring.com> wrote:
Mark McIntyre wrote:
So can we settle on "a pointer is an object that can probably point to
another object, or possibly to a function, which is possibly not an
object, ouch my head hurts"?


A pointer doesn't have to be an object.


I feel pretty comfortable that a pointer has to be an object.
Otherwise how could you point to it?
A pointer could also be the address of an object.


It might *contain* that, but it itself must be an object. I think....


int a;
&a;

(&a) is a pointer, but not an object.
Nov 13 '05 #229
Irrwahn Grausewitz wrote:
pete <pf*****@mindsp ring.com> wrote:
Mark McIntyre wrote:
>
> And are functions objects?


No.
> So can we settle on "a pointer is an object that can probably point to
> another object, or possibly to a function, which is possibly not an
> object, ouch my head hurts"?


A pointer doesn't have to be an object.
A pointer could also be the address of an object.


To dissolve this ambiguity one could differentiate between "pointer
variables" (which represent objects that can hold pointer values) and
"pointer values" which are ... err ... pointer values :)


Problem: an object that holds a pointer value need not be a variable. For
example:

int i = 6;
int * const p = &i; /* p is not a variable - or at least, to persuade anyone
that it is, you'd have to have kissed the Blarney. */

--
Richard Heathfield : bi****@eton.pow ernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton
Nov 13 '05 #230

This thread has been closed and replies have been disabled. Please start a new discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.