Thread: precedence / associativity

  1. #1
    Registered User
    Join Date
    Jan 2002
    Posts
    41

    precedence / associativity

    Are my comments regarding the staement below correct.

    node *top_ptr=create_node();

    // () has highest precedence so function called first
    // then * indirection operator has second highest precedence so create pointer
    // finally = assignment operator lowest precedence used last
    // to assign whats on the rhs to the lhs ie returned address to pointer.

    Thanks all for taking the time to help me.

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >Are my comments regarding the staement below correct.
    Basically, yes.
    My best code is written with the delete key.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C4554 Warning, check operator precedence for possible error
    By Bassquake in forum C++ Programming
    Replies: 2
    Last Post: 06-05-2008, 05:13 AM
  2. associativity of operators
    By hitesh_best in forum C Programming
    Replies: 2
    Last Post: 08-03-2007, 02:05 PM
  3. precedence problem
    By timhxf in forum C Programming
    Replies: 3
    Last Post: 12-13-2006, 09:10 AM
  4. Replies: 15
    Last Post: 11-04-2006, 04:06 AM
  5. precedence
    By modec in forum C Programming
    Replies: 3
    Last Post: 05-22-2003, 11:37 AM