By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,401 Members | 793 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,401 IT Pros & Developers. It's quick & easy.

POINTERS

P: n/a
hi sir,
sir i want to know a simple pointer concept.
Q) ..... when all of thw address are integer then why we uses the
pointer of type char,float etc.

Sep 23 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a

akhilesh natani wrote:
hi sir,
sir i want to know a simple pointer concept.
Q) ..... when all of thw address are integer then why we uses the
pointer of type char,float etc.
as far as I know, pointers need to know not only what the address is,
but also what the address is pointing to. only in this way can the
operators ++ and --, etc work properly when applied to a pointer.

Sep 23 '06 #2

P: n/a

"akhilesh natani" <ak************@gmail.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
hi sir,
sir i want to know a simple pointer concept.
Q) ..... when all of thw address are integer then why we uses the
pointer of type char,float etc.
A pointer is an internal address. As such, pointers are more like bit
strings than integers. For instance, on a 64 bit machine, a pointer is going
to occupy 64 bits, even if an int only occupies 32. No matter how you
regard pointers, the data type of "a pointer to an int" is some variation of
int*--not the same data type as int.

-Bill
Sep 23 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.