C&ds questions

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • harisrinu
    New Member
    • Sep 2007
    • 3

    C&ds questions

    When reallocating memory if any other pointers point into the same piece of memory do you have to readjust these other pointers or do they get readjusted automatically?


    Parenthesis are never needed in prefix or postfix expressions. Why?
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by harisrinu
    When reallocating memory if any other pointers point into the same piece of memory do you have to readjust these other pointers or do they get readjusted automatically?


    Parenthesis are never needed in prefix or postfix expressions. Why?
    You have to adjust those other pointers yourself, i.e. they don't automagically
    update themselves.

    The pre- and postfix unary operators take an lvalue as their only argument and
    you don't need to parenthesize an lvalue, e.g. x == (x) == ((x)) == (((x))) etc.
    The precedence of those operators are higher than of other operators so you
    don't need parentheses around the entire sub-expression either.

    kind regards,

    Jos

    Comment

    Working...