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 1104393
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T01:28:38+00:00 2026-05-17T01:28:38+00:00

Here is my function: void abc(char *def, unsigned int w, unsigned int x, unsigned

  • 0

Here is my function:

void abc(char  *def, unsigned int w, unsigned int x, unsigned int y, unsigned int z)
{
   printf("val 1 : %d\n", w);
   printf("val 2 : %d\n", x);
   printf("val 3 : %d\n", y);
   printf("val 4 : %d\n", z);
}

and here is where I call this function:

unsigned int exp[4] = { 1, 2, 3, 4 };
unsigned short count = 0;
abc(anyarray, exp[count++], exp[count++], exp[count++], exp[count++]);

and here is the output that I expect:

val1 : 1
val2 : 2
val3 : 3
val4 : 4

but what I get is completely reverse of it:

val1 : 4
val2 : 3
val3 : 2
val4 : 1

I don’t know why? Any help would be appreciated.

  • 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-17T01:28:39+00:00Added an answer on May 17, 2026 at 1:28 am

    From standard docs, 5.4

    Except where noted, the order of evaluation of operands of individual operators and subexpressions of individual expressions,
    and the order in which side effects take place, is unspecified58) Between the previous and next sequence point a
    scalar object shall have its stored value modified at most once by the evaluation of an expression. Furthermore, the prior
    value shall be accessed only to determine the value to be stored. The requirements of this paragraph shall be met for
    each allowable ordering of the subexpressions of a full expression; otherwise the behavior is undefined.

    An example from the Standard docs itself,

    i = v[i ++]; / / the behavior is undefined

    And it is for the very same reason that

    abc(anyarray, exp[count++], exp[count++], exp[count++], exp[count++]); is undefined..

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is my function: private void btnSave_Click(object sender, EventArgs e) { wO_FlangeMillBundlesTableAdapter.Update(invClerkDataDataSet.WO_FlangeMillBundles); wO_HeadMillBundlesTableAdapter.Update(invClerkDataDataSet.WO_HeadMillBundles); wO_WebMillBundlesTableAdapter.Update(invClerkDataDataSet.WO_WebMillBundles);
I'm try to use ASP.NET 4.0 WebForms Routing. Here is my RegisterRoutes function: void
I have the function prototype here: extern C void __stdcall__declspec(dllexport) ReturnPulse(double*,double*,double*,double*,double*); I need to
Here is function , <script type=text/javascript> $(document).ready(function() { getRecordspage(1, 5); $(a.page-numbers).click(function() { alert(1); getRecordspage($(this).text(),
I have this simple function: <script type=text/javascript> //<![CDATA[ jQuery(function($){ function here(b){alert(b);} ; here(6); });
Here is my code function: void ReportHistory::update(void) { ui.output->clear(); ui.output->setCurrentFont(QFont(Arial, 8, QFont::Normal)); QString title
I have some function: void addNormalLine(int id, LineNumber number, Rate smsRate, Rate callRate) {
so here's my function + (void) AddAddress:(NSString*)ip:(NSString*)mac { NSMutableDictionary* currentAddresses = [[NSMutableDictionary alloc] initWithContentsOfFile:[self
In the following code, g++ gives this error : 1.cpp: In member function void
I have this setup: class A { public: virtual void Function(); } class B

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.