C Pointers Question:

Download Job Interview Questions and Answers PDF

Can we add pointers together?

C Pointers Interview Question
C Pointers Interview Question

Answer:

No, you can't add pointers together. If you live at 1332 Lakeview Drive, and your neighbor lives at 1364 Lakeview, what's 1332+1364? It's a number, but it doesn't mean anything. If you try to perform this type of calculation with pointers in a C program, your compiler will complain.

Download C Pointers Interview Questions And Answers PDF

Previous QuestionNext Question
Tell me is NULL always defined as 0(zero)?Tell me when would you use a pointer to a function?