New course! Every coder should learn Generative AI!
Try a free lesson+ 7
Why is the output 4 ????
3 Answers
+ 6
Mohammad Nabavi You're welcome! 😉
+ 6
The integer getting parsed was treated as base 2 and here's how we count in binary:-
0
1
10
11
100 <- 4
101
110
111
...
+ 5
thank😉