Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8394557
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T20:05:31+00:00 2026-06-09T20:05:31+00:00

Please note, that this has nothing to do with Operator Precedence.. () and ++

  • 0

Please note, that this has nothing to do with Operator Precedence.. () and ++ , Undefined behavior and sequence points , Why are these constructs using pre and post-increment undefined behavior? and the hundreds similar questions about this here


Shortly: is the Associativity guaranteed by the standard?

Detailed example: from Wikipedia‘s article for operator precedence, operator* and operator/ have the same priority and they are Left-to-right operators. Does this mean, that the standard guarantees, that this:

int res = x / y * z / t;

will be evaluated as

int res = ( ( x / y ) * z ) / t;

or it’s implementation defined?

If it’s guaranteed, could you quote?


It’s just out of curiosity, I always write brackets in these cases.
Ready to delete the question, if there’s such one.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T20:05:32+00:00Added an answer on June 9, 2026 at 8:05 pm

    From the latest publicly available draft

    5.6 Multiplicative operators [expr.mul]

    1 The multiplicative operators *, /, and % group left-to-right.

    multiplicative-expression:
    pm-expression
    multiplicative-expression * pm-expression
    multiplicative-expression / pm-expression
    multiplicative-expression % pm-expression
    

    So parsing will go like:

    int res = x / y * z / t;
    int res = (x / y * z) / t;
    int res = ((x / y) * z) / t;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

[Please note that this is a different question from the already answered How to
Please note that this is not homework and i did search before starting this
Please note that this question is from 2008 and now is of only historic
Please note that I did ask this on Super User and received absolutely no
Can I write XSD schema for this? Please note that the category is repeated
How can I convert Persian date to Gregorian date using System.globalization.PersianCalendar? Please note that
Please note that I'm not asking how but why. And I don't know if
(Please note that I have seen a similar question on StackOverflow recently, however I
When open a query in Microsoft project, the start date changes. Please note that,
I mean things like: FK1 -> 1FK2 -> 2PK Please, note that 1FK2 is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.