S
somenath
Hi All,
I have one question regarding the conditional operator.
In the draft C99 standard it is mentioned that
"1 The following are the sequence points described in 5.1.2.3:
-- The call to a function, after the arguments have been evaluated
(6.5.2.2).
-- The end of the first operand of the following operators: logical AND
&& (6.5.13);
logical OR || (6.5.14); conditional ? (6.5.15); comma , (6.5.17)."
My question is conditional operator consist of "?" and ":" . Now
if I try to modify the value of one particular variable between "?"
and ": " will it show undefined behavior?
For example
b = (a++)? a++: a++;
Here is the second increment of a++ will be undefined?
Regards,
Somenath
I have one question regarding the conditional operator.
In the draft C99 standard it is mentioned that
"1 The following are the sequence points described in 5.1.2.3:
-- The call to a function, after the arguments have been evaluated
(6.5.2.2).
-- The end of the first operand of the following operators: logical AND
&& (6.5.13);
logical OR || (6.5.14); conditional ? (6.5.15); comma , (6.5.17)."
My question is conditional operator consist of "?" and ":" . Now
if I try to modify the value of one particular variable between "?"
and ": " will it show undefined behavior?
For example
b = (a++)? a++: a++;
Here is the second increment of a++ will be undefined?
Regards,
Somenath