Adjust the fifth question
This commit is contained in:
committed by
İnanç Gümüş
parent
3e1a337b06
commit
7888d7844b
@ -35,14 +35,14 @@
|
|||||||
5. 64
|
5. 64
|
||||||
|
|
||||||
|
|
||||||
## What's the output of following code?
|
## What's the output of the following code?
|
||||||
```go
|
```go
|
||||||
fmt.Printf("%08b = %d", 2, 2)
|
fmt.Printf("%08b = %d", 2, 2)
|
||||||
```
|
```
|
||||||
1. 00000001
|
1. 00000001 = 2
|
||||||
2. 00000010 *CORRECT*
|
2. 00000010 = 2 *CORRECT*
|
||||||
3. 00000100
|
3. 00000100 = 2
|
||||||
4. 00001000
|
4. 00001000 = 2
|
||||||
|
|
||||||
> EXPLANATION = From right to left, each bit goes from 2^0 to 2^(n - 1).
|
> EXPLANATION = From right to left, each bit goes from 2^0 to 2^(n - 1).
|
||||||
|
|
||||||
@ -133,4 +133,4 @@ fmt.Print(num - 3)
|
|||||||
> **1:** int8's min capacity is -128. It can't be -131.
|
> **1:** int8's min capacity is -128. It can't be -131.
|
||||||
>
|
>
|
||||||
> **2:** Signed integers wrap around after their minimum capacity. int8's min is -128, so, if -128 - 1 is 127, then -128 - 3 is 125.
|
> **2:** Signed integers wrap around after their minimum capacity. int8's min is -128, so, if -128 - 1 is 127, then -128 - 3 is 125.
|
||||||
>
|
>
|
||||||
|
Reference in New Issue
Block a user