Home > Back-end >  About the printf function
About the printf function

Time:10-01

I read about the printf function expression calculation sequence is divided in brackets,
Have said expression from right to left compilers vary on the basis of the said UB, if from right to left, should not calculate 6678? Or say it is a matter of ub?

CodePudding user response:

Baidu, undefined behavior

CodePudding user response:

refer to the original poster swift_ant response:
I read about the printf function expression calculation sequence is divided in brackets,
Have said expression from right to left compilers vary on the basis of the said UB, if from right to left, should not calculate 6678? Or say it is a matter of ub?
I mean, is it a Undefined behaviors, but I see many people post CSDN BBS and tutorials are said to be from right to left

CodePudding user response:

refer to the second floor swift_ant response:
Quote: refer to the original poster swift_ant response:

I read about the printf function expression calculation sequence is divided in brackets,
Have said expression from right to left compilers vary on the basis of the said UB, if from right to left, should not calculate 6678? Or say it is a matter of ub?
I mean, is it a Undefined behaviors, but I see many people post CSDN BBS and tutorials are said to be from right to left
is UB
There is no doubt

CodePudding user response:

refer to the second floor swift_ant response:
I mean, is it a Undefined behaviors, but I see many people post CSDN BBS and tutorials are said to be from right to left

Don't write the code, the question is meaningless, C/C + + standard is first processed parameters, then will be handed in, parameters or handling a one? Or the other? According to you mean output 6678, should be from right to left, processing a pass in a, but the C/C + + has a regulation this order?

CodePudding user response:

reference 4 floor Italink response:
Quote: refer to the second floor swift_ant response:

I mean, is it a Undefined behaviors, but I see many people post CSDN BBS and tutorials are said to be from right to left

Don't write the code, the question is meaningless, C/C + + standard is first processed parameters, then will be handed in, parameters or handling a one? Or the other? According to you mean output 6678, should be from right to left, processing a pass in a, but the C/C + + has a regulation this order?

You see blog about the printf function order on the CSDN how much besides, what is a meaningless question?

CodePudding user response:

https://bbs.csdn.net/topics/340075180

So then you think

CodePudding user response:

Behavior depends on the compiler, the authority repeatedly stressed in the book, it is undefined behavior, unless you want to make a better print, or to delve into this meaningless,

CodePudding user response:

refer to 7th floor m0_46108109 response:
behavior depends on the compiler, the authority repeatedly stressed in the book, it is undefined behavior, unless you want to make a better print, otherwise to delve into this meaningless,

Not study, but is not the same as the novice to see that confused don't know which letter
  • Related