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

  • SEARCH
  • Home
  • 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 1018365
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T10:50:49+00:00 2026-05-16T10:50:49+00:00

A sequence point in imperative programming defines any point in a computer program’s execution

  • 0

A sequence point in imperative programming defines any point in a computer program’s execution at which it is guaranteed that all side effects of previous evaluations will have been performed, and no side effects from subsequent evaluations have yet been performed.

What does this mean? Can somebody please explain it in simple words?

  • 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-05-16T10:50:50+00:00Added an answer on May 16, 2026 at 10:50 am

    When a sequence point occurs, it basically means that you are guaranteed that all previous operations are complete.

    Changing a variable twice without an intervening sequence point is one example of undefined behaviour.

    For example, i = i++; is undefined because there’s no sequence point between the two changes to i.

    Note that it’s not just changing a variable twice that can cause a problem. It’s actually a change involved with any other use. The standard uses the term “value computation and side effect” when discussing how things are sequenced. For example, in the expression a = i + i++, the i (value computation) and i++ (side effect) may be done in arbitrary order.

    Wikipedia has a list of the sequence points in the C and C++ standards although the definitive list should always be taken from the ISO standard. From C11 appendix C (paraphrased):


    The following are the sequence points described in the standard:

    • Between the evaluations of the function designator and actual arguments in a function call and the actual call;
    • Between the evaluations of the first and second operands of the operators &&, ||, and ,;
    • Between the evaluations of the first operand of the conditional ?: operator and whichever of the second and third operands is evaluated;
    • The end of a full declarator;
    • Between the evaluation of a full expression and the next full expression to be evaluated. The following are full expressions:
      • an initializer;
      • the expression in an expression statement;
      • the controlling expression of a selection statement (if or switch);
      • the controlling expression of a while or do statement;
      • each of the expressions of a for statement;
      • the expression in a return statement.
    • Immediately before a library function returns;
    • After the actions associated with each formatted input/output function conversion specifier;
    • Immediately before and immediately after each call to a comparison function, and also between any call to a comparison function and any movement of the objects passed as arguments to that call.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicates: C programming: is this undefined behavior? Is this program having any sequence
How to convert a floating point number into a sequence of bytes so that
Related question: Any good reason why assignment operator isn't a sequence point? From the
Given sequence : [1,A,B,C,2,F,K,L,5,6,P,I,E] The numbers represent items that I identify as headers, whereas
I have a sequence which varies in length e.g. something like: items <- 1:4
The C99 Standard says in $6.5.2. Between the previous and next sequence point an
Generate the Fibonacci sequence in the fewest amount of characters possible. Any language is
By common script startup sequence, what I mean is that in the majority of
I'd like my generated output file to contain file paths that point to a
Is there a sequence point between structure member initialization expressions? For example, is it

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.