473,842 Members | 1,917 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 21968
Roose wrote:
> This is irrelevant to the
> question at hand, which is whether my argument was logically
> consistent.
Ah. I thought the question at hand was the question you actually asked.
Sorry if I misunderstood you. Okay, is your argument logically
consistent? No.


Let's hear a reason for this, please. My assertion is that I have posted
here before, but not under the handle Roose.


I challenge your assertion. Please provide evidence in support of it. In the
absence of such evidence, people will of course draw their own conclusions.
What, exactly, is "silly" about this, regardless of its truth. I know you
doubt me, as you have stated, but you can simply say so (and you did).
But instead you chose, embarassingly, to try to debunk my argument with a
series
of silly statements yourself. Like the fact that I must be
"non-existent", etc. and similar blabber.
But you yourself said this. If it's blabber, it's /your/ blabber.
> This hypocrisy thing keeps coming back to bite you.


I've already admitted that I'm about as hypocritical as the next man. But
let me read between the lines (or line, in this case)... Are you actually
claiming that you, alone of all humans, are free from hypocrisy? Are you
*really* as hypocritical as that? Sorry, but I don't - I /can't/ -
believe it of you.


Wow, Richard is reading between the lines finally! But no, I make no such
claim of myself, only that you have obviously been a hypocrite.


Of course. We all are, you included. So?

--
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 #271
Chris Torek <no****@elf.eng .bsdi.com> wrote:
Chris Torek <no****@elf.eng .bsdi.com> writes:
For something really different, I would suggest trying[list of
"different" machines]

In article <3F************ ***@yahoo.com> CBFalconer <cb********@yah oo.com>
writes:
Shouldn't the HP3000 running MPE fit in there somewhere? I
believe it just became unsupported. Many Burroughsisms. It DID
have a C compiler 25 years ago.
Well, 25 years ago was 1987, which predates ANSI C, but mainly I


If that's the case then I'm much older than I thought I was.
Thanks Chris!

Alex
Nov 13 '05 #272
goose wrote:
Mark McIntyre <ma**********@s pamcop.net> wrote in message
news:<hp******* *************** **********@4ax. com>...

And are functions objects?


iirc, yes.


YRI.

--
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 #273
Sheldon Simms wrote:

On Wed, 05 Nov 2003 14:30:33 +0000, pete wrote:
goose wrote:

Mark McIntyre <ma**********@s pamcop.net> wrote in message news:<hp******* *************** **********@4ax. com>...
> On Tue, 4 Nov 2003 06:28:29 +0000 (UTC), in comp.lang.c , 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....
>
> And are functions objects?

iirc, yes.

>
> 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"?
> :-)
>

<grin>
or even more convoluted, how about
"a pointer is an /object/
whose legal values can only be /addresses/
of other objects" ?


The null pointer constant, mentioned above,
is a defined value for pointers, but is not an address.
The "one past" pointer, also has a legal value,
but does not point to an object.


A null pointer constant is not a pointer at all. It first becomes a
(null) pointer after conversion to a pointer type.


((void *)0) is a null pointer constant.
The type of ((void *)0), is pointer to void.

After this line of code:

char *pointer = (void *)0;

The value of pointer, is not an address.
The value of pointer is legal.

--
pete
Nov 13 '05 #274
Richard Heathfield <do******@addre ss.co.uk.invali d> scribbled the following:
goose wrote:
Mark McIntyre <ma**********@s pamcop.net> wrote in message
news:<hp******* *************** **********@4ax. com>...

And are functions objects?
iirc, yes.

YRI.


TIWITAW.

--
/-- Joona Palaste (pa*****@cc.hel sinki.fi) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"A computer program does what you tell it to do, not what you want it to do."
- Anon
Nov 13 '05 #275


On 11/4/2003 6:29 PM, Mark McIntyre wrote:
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.


Well, it seemed like a reasonable suggestion at the time :-(. At least it's been
somewhat entertaining... ..

Ed.

Nov 13 '05 #276
Sheldon Simms wrote:

On Wed, 05 Nov 2003 05:59:32 +0000, Richard Heathfield wrote:
Keith Thompson wrote:
Sheldon Simms <sh**********@y ahoo.com> writes:

[...]
In any case, I would call p a variable - a const variable. If you're
speaking English, it's a contradiction, but we're speaking jargon.

Hmm. Since the C standard doesn't define the term "variable", I'd
prefer to use it in its normal English sense, which would exclude
objects whose value cannot be modified.


That is precisely how I use it. I'm aware of this strange idea of "const
variable". I think it's easier and more useful to talk about objects.


The word variable comes to programming from mathematics, where it
is also possible to have a variable with a constant value.

Also, I think there is an important difference between the concepts
of "variable" and "object". A variable is a named, typed, object. An
object is, by itself, only storage. It can store a value, but doesn't
have any inherent type or name.


The bit pattern stored in a nameless typeless object,
doesn't have any inherent value either.

The same object, can represent different values,
with the same bit pattern, depending on the type of
the identifier used to access the object.

If you malloc a byte, for a pointer to void, called pointer,
and then make an assignment like
*(signed char*)pointer = -1;
then, an expression like
(*(unsigned char*)pointer)
would have a different value.

--
pete
Nov 13 '05 #277
Richard Heathfield wrote:
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.


This is inane. Connor appears to be as un-educable as
Cunningham. I wonder if he and Roose have gotten together in some
manner to stir up the ant-hill called c.l.c. They don't appear to
be the same person. Will this get me on his plonk list?

--
Chuck F (cb********@yah oo.com) (cb********@wor ldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home .att.net> USE worldnet address!
Nov 13 '05 #278
Irrwahn Grausewitz <ir*******@free net.de> writes:
Keith Thompson <ks*@cts.com> wrote:

[...]
Does this refer to Richard or to me?


Err, damn, no, neither! I managed to forget to mention the name of the
individual in question: Alan Conor.
Did you ever abuse usenet in a manner that would make it worth to do a
google search? Can't imagine that. :)


No, I don't think so. Searching for my own name is somewhat
interesting to me, but probably not to anyone else.

--
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 #279
Sheldon Simms <sh**********@y ahoo.com> writes:
[...]
A null pointer constant is not a pointer at all. It first becomes a
(null) pointer after conversion to a pointer type.


A null pointer constant is a syntactic entity, a construct in C source
code. A null pointer is a value that can exist at run time. They
have much the same relationship as an identifier and an object, or the
consecutive characters '4' and '2' in your foo.c file and the bits
representing the integer 42 in your running program.

--
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 #280

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.