Programming with C

⌘K
  1. Home
  2. Docs
  3. Programming with C
  4. Functions and Pointers
  5. Pointer Arithmetic
  6. Illegal Pointer Operations

Illegal Pointer Operations

Illegal Pointer Operations

  • Addition of two pointers is not allowed
  • Only integers can be added to pointers. It is not valid to add a float or double to a pointer
  • Multiplication and division operators cannot be applied on pointers
  • A pointer of one type cannot be assigned to a pointer of another type (except void *) without explicit type casting
  • A pointer variable cannot be assigned to a non address value ( except zero)

Views: 0

How can we help?

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments