For more than one format specifiers, why compiler evaluate it from the last ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

For more than one format specifiers, why compiler evaluate it from the last ?

Like if there is( "%d%d%d%d", i ,i++,i--,++i)...so why the order of evaluation in C is 4-3-2-1, means from the last . Please Explain me.

10th Jun 2019, 6:32 AM
SOHAN SARKAR
SOHAN SARKAR - avatar
1 Answer
+ 3
What matters here is not the format specifier, it is multiple access and modification of the arguments that matters, the output is compiler implementation dependent, we can't expect a firm output because of this. Tips: Avoid at best, accessing and modifying a value in a sequence point, how the operation is performed is unpredictable. Hth, cmiiw
10th Jun 2019, 7:08 AM
Ipang