Re: Valid operations on pointers in C
From: Rakesh Kumar (dreamzlion_nospamplz_at_yahoo.com)
Date: 04/23/04
- Next message: pembed2003: "protect my char* from outside"
- Previous message: Arthur J. O'Dwyer: "Re: Arithmetic on function address"
- In reply to: aruna: "Valid operations on pointers in C"
- Next in thread: Joona I Palaste: "Re: Valid operations on pointers in C"
- Reply: Joona I Palaste: "Re: Valid operations on pointers in C"
- Reply: Irrwahn Grausewitz: "Re: Valid operations on pointers in C"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 23 Apr 2004 14:23:42 -0700
Addition / subtraction is definitely allowed, the reason being pointers
refer to address and you can back and forth in the memory space. (Say,
as in an array as the memory is allocated continuously ).
Multiplication / Division just does not make sense, as there is no
necessity for them logically in a given program.
HTH
aruna wrote:
> Why division/mulitiplication/addition of pointers are not
> allowed in C?
- Next message: pembed2003: "protect my char* from outside"
- Previous message: Arthur J. O'Dwyer: "Re: Arithmetic on function address"
- In reply to: aruna: "Valid operations on pointers in C"
- Next in thread: Joona I Palaste: "Re: Valid operations on pointers in C"
- Reply: Joona I Palaste: "Re: Valid operations on pointers in C"
- Reply: Irrwahn Grausewitz: "Re: Valid operations on pointers in C"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|