Postfix / Prefix Operators on array / pointer, search key word wanted[OT]

S

sathya_me

By searching with following key word in google clc and google's WWW
archives:
1) Pointer arithmetic
2) Pointer subtraction

I get some links for the question in subject line.

Bitwise operator is a constrain. So I need not search
about it.

3)Postfix operators (on/and) array
By the above key word is failed to return any pointers

4)operators and array
Some results

5)array subtraction
Finds no results

6)pointer subtraction
Throws some results

Can Any body help me with the ideas for more proper key words for
the subject (i.e. Arrays and C operators) to search both clc and
google's WWW
for links?

Thanks


--
"Combination is the heart of chess"
A.Alekhine
Mail to:
sathyashrayan25 AT yahoo DOT com
(AT = @ and DOT = .)
 
J

Jens.Toerring

sathya_me said:
By searching with following key word in google clc and google's WWW
archives:
1) Pointer arithmetic
2) Pointer subtraction

I get some links for the question in subject line.

Bitwise operator is a constrain. So I need not search
about it.
3)Postfix operators (on/and) array
By the above key word is failed to return any pointers
4)operators and array
Some results

Probably because you can't apply operators (postfix or not) to arrays
as a whole.
5)array subtraction
Finds no results

Probably because you can't subtract (from) arrays as a whole.
6)pointer subtraction
Throws some results

Probably because you can subtract pointers pointing to the same
elements of the same array.
Can Any body help me with the ideas for more proper key words for
the subject (i.e. Arrays and C operators) to search both clc and
google's WWW for links?

There are no C operators you can apply to whole arrays. So there's
nothing really worth looking for.
Regards, Jens
 
P

pete

There are no C operators you can apply to whole arrays.

You can apply the sizeof operator, the address operator,
and in the case of initialization, the assignment operator.
 
B

Barry Schwarz

You can apply the sizeof operator, the address operator,
and in the case of initialization, the assignment operator.

Not to mention the subscript and cast operators.


<<Remove the del for email>>
 
P

pete

Barry said:
Not to mention the subscript and cast operators.

In both of those cases,
the array has been converted to a pointer to it's first element,
prior to the operation.
 
S

sathya_me

sathya_me said:
By searching with following key word in google clc and google's WWW
archives:
1) Pointer arithmetic
2) Pointer subtraction
I get some links for the question in subject line.

Bitwise operator is a constrain. So I need not search
about it.

3)Postfix operators (on/and) array
By the above key word is failed to return any pointers
4)operators and array
Some results

5)array subtraction
Finds no results

6)pointer subtraction
Throws some results

Can Any body help me with the ideas for more proper key words for
the subject (i.e. Arrays and C operators) to search both clc and
google's WWW
for links?

Thanks
Shall I drop the current way of learning and take the C99 STD and
do operator - by - operator learning. Please give me a correct replay
for key words since "array" gives me a lot of messages and links.

--
"Combination is the heart of chess"
A.Alekhine
Mail to:
sathyashrayan25 AT yahoo DOT com
(AT = @ and DOT = .)
 
P

Peter Nilsson

pete said:
You can apply the sizeof operator, the address operator,
and in the case of initialization, the assignment operator.

You're not really using an assignment operator (there's more than one) when
initialising. Although "...the same type constraints and conversions as for
simple assignment apply," you're assigning values to elements of the array,
not the array 'as a whole'. A simple assignment on an array violates the
contraint of 6.5.16.1.
 
P

pete

Peter said:
You're not really using an assignment operator
OK

(there's more than one) when
initialising.
Although "...the same type constraints and conversions as for
simple assignment apply," you're assigning values
to elements of the array, not the array 'as a whole'.

Does an expression of an array type, have a value?
The value of the other kind of aggregate, a structure,
is the value of each of it's members considered collectively.
I don't think there's anything you can do with the value
of an array in C code, but is there even any such thing?
Do arrays constitute a category of object types which don't
have values?
A simple assignment on an array violates the
contraint of 6.5.16.1.

Yes, it does.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top