0
Why the output print 70 instead of 106? Can you explain
#include <stdio.h> int main() { int var=0101; var=var+5; printf("%d",var); return 0; }
2 Answers
+ 6
0 is an octal literal, so 0101 would be 8^0 + 8^2 = 65 in decimal.
Then you add 5 so thats 70.
0