Why did we get this output? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Why did we get this output?

I know printf() returns the number of characters after printing but why is the output 6521 for this? https://code.sololearn.com/cPBTJVUpJ73n/?ref=app

24th Jul 2020, 5:05 PM
Levi
Levi - avatar
3 Answers
+ 4
000101 is octal representation of decimal 65 The first 2 of the output (65) was this number The third of the output (2) was the number of characters used to print 65 (2 characters, 6 and 5) The fourth of the output (1) was the number of characters used to print 2 (the length of '65'). Hth, cmiiw
24th Jul 2020, 5:16 PM
Ipang
+ 1
Ipang Got it, thanks!
24th Jul 2020, 5:20 PM
Levi
Levi - avatar
24th Jul 2020, 5:26 PM
Levi
Levi - avatar