Hi , i''m Smith. I want to know more abou C pointers . And its use in C. Friends, those who are interested in this topic please give me good idea . First of all i want to know About basic things about pointers. What is a C pointer? And give me one Example also ?

Hii Smith. i''m Crys. I think, i can help you.
A pointer is a special kind of variable. Pointers are designed for storing memory address.The "address of" operator '&' and the "dereferencing" operator '*' are available for working with pointers.
For Eg:
int y;
int *pointer_to_y;
pointer_to_y = &y;

Hi Crys , there are some more things about Pointers. Declaring a pointer is the same as declaring a normal variable except that an asterisk '*' is placed in front of the variable identifier.Both '&' and '*' are prefix unary operator.Thank you.

Thank you crys, jimm and Nick. yea i have so many questions regarding pointers in C.
Does *p++ increment p. Or What it points to ?

Edited 6 Years Ago by Nick Evan: n/a

Hii Smith. That was a good question. I can help you.
Unary operator like *,++ and -- all associates from right to left. There for *p++ increments p and returns the value pointed to by p before the increment. To increment the value pointed to by p,use (*p) ++.

Sir,
first of all i am saying i'm not argueing with you. Yea i think. You have very well knowledge about this topic.I respect you sir. But, every complex things and matters of any language r starting from its basics. We are all from same home , neighbours also. We are using the same PC. So IP address is same. We know the modeartors can find out very easily. But this is a discusiion community. and we are the members of it. We are just trying to discuss the simple and basics of this topic. It may be useful to beginners in C and those who are interested in it.

Anyway sorry sir...

Thank you 4 ur valuable adice.

Can we proceed sir?

C language doesn't allow pointer arithmetic on void pointers.
Why arithmetic operation can't be performed on a void pointer ?
Anybody, please tell more about void pointer ?

>We are using the same PC. So IP address is same.
I believe that you're using the same PC. I don't believe that you are different people. Each post was made less than 10 minutes apart, so unless you're actually three people switching seats to talk to each other on a forum when you could do so in person, I claim that you're one person with some strange fetish.

>Can we proceed sir?
I'm not going to stop you, but I don't agree with your little multiple personality game. Asking questions you already know the answer to then answering them is actually unhelpful. For example, when I ask a question that I know the answer to, I ask the question in such a way that betrays my knowledge. A beginner wouldn't ask the question like that, and is unlikely to understand either the question or the answer because of it. It's more productive to wait for a real beginner to ask a question and then answer it.

This article has been dead for over six months. Start a new discussion instead.