why do they shows different output clang and gcc [closed]











up vote
-3
down vote

favorite












one day i was using the GCC compiler dev c++ and typed a simple program of incrementation like



int x=1;
x=x++ + ++x + x++;
cout<<x;


it shows output



7


but in other compiler CLang compiler it shows different output
why?
please help me i am new in programming kindly guide me.
thanking you in advance










share|improve this question







New contributor




user195081 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











closed as off-topic by Heslacher, 200_success, Toby Speight, RoToRa, πάντα ῥεῖ Nov 15 at 12:01


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Authorship of code: Since Code Review is a community where programmers improve their skills through peer review, we require that the code be posted by an author or maintainer of the code, that the code be embedded directly, and that the poster know why the code is written the way it is." – Heslacher, 200_success, πάντα ῥεῖ

If this question can be reworded to fit the rules in the help center, please edit the question.

















    up vote
    -3
    down vote

    favorite












    one day i was using the GCC compiler dev c++ and typed a simple program of incrementation like



    int x=1;
    x=x++ + ++x + x++;
    cout<<x;


    it shows output



    7


    but in other compiler CLang compiler it shows different output
    why?
    please help me i am new in programming kindly guide me.
    thanking you in advance










    share|improve this question







    New contributor




    user195081 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.











    closed as off-topic by Heslacher, 200_success, Toby Speight, RoToRa, πάντα ῥεῖ Nov 15 at 12:01


    This question appears to be off-topic. The users who voted to close gave this specific reason:


    • "Authorship of code: Since Code Review is a community where programmers improve their skills through peer review, we require that the code be posted by an author or maintainer of the code, that the code be embedded directly, and that the poster know why the code is written the way it is." – Heslacher, 200_success, πάντα ῥεῖ

    If this question can be reworded to fit the rules in the help center, please edit the question.















      up vote
      -3
      down vote

      favorite









      up vote
      -3
      down vote

      favorite











      one day i was using the GCC compiler dev c++ and typed a simple program of incrementation like



      int x=1;
      x=x++ + ++x + x++;
      cout<<x;


      it shows output



      7


      but in other compiler CLang compiler it shows different output
      why?
      please help me i am new in programming kindly guide me.
      thanking you in advance










      share|improve this question







      New contributor




      user195081 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      one day i was using the GCC compiler dev c++ and typed a simple program of incrementation like



      int x=1;
      x=x++ + ++x + x++;
      cout<<x;


      it shows output



      7


      but in other compiler CLang compiler it shows different output
      why?
      please help me i am new in programming kindly guide me.
      thanking you in advance







      programming-challenge compiler






      share|improve this question







      New contributor




      user195081 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question







      New contributor




      user195081 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question






      New contributor




      user195081 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked Nov 15 at 7:19









      user195081

      1




      1




      New contributor




      user195081 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      user195081 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      user195081 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




      closed as off-topic by Heslacher, 200_success, Toby Speight, RoToRa, πάντα ῥεῖ Nov 15 at 12:01


      This question appears to be off-topic. The users who voted to close gave this specific reason:


      • "Authorship of code: Since Code Review is a community where programmers improve their skills through peer review, we require that the code be posted by an author or maintainer of the code, that the code be embedded directly, and that the poster know why the code is written the way it is." – Heslacher, 200_success, πάντα ῥεῖ

      If this question can be reworded to fit the rules in the help center, please edit the question.




      closed as off-topic by Heslacher, 200_success, Toby Speight, RoToRa, πάντα ῥεῖ Nov 15 at 12:01


      This question appears to be off-topic. The users who voted to close gave this specific reason:


      • "Authorship of code: Since Code Review is a community where programmers improve their skills through peer review, we require that the code be posted by an author or maintainer of the code, that the code be embedded directly, and that the poster know why the code is written the way it is." – Heslacher, 200_success, πάντα ῥεῖ

      If this question can be reworded to fit the rules in the help center, please edit the question.



























          active

          oldest

          votes






















          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes

          Popular posts from this blog

          Сан-Квентин

          Алькесар

          Josef Freinademetz