I found this following code for addition of two numbers without using the +
operator.
code to add 3 and 4:
printf("%d",printf("%*c%*c",3,' ',4,' '));
Now printf()
returns the number of characters in the result
and %*c
ignores the next character that it encounters. But still, I am not able to understand this code. Any help would be appreciated.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…