|
|
@ -2,7 +2,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
### Instructions |
|
|
|
### Instructions |
|
|
|
|
|
|
|
|
|
|
|
Write a function that takes `(arr [10]int)`, and displays the memory as in the example. |
|
|
|
Write a function that takes `(arr [10]byte)`, and displays the memory as in the example. |
|
|
|
|
|
|
|
|
|
|
|
After displaying the memory the function must display all the ASCII graphic characters. The non printable characters must be replaced by a dot. |
|
|
|
After displaying the memory the function must display all the ASCII graphic characters. The non printable characters must be replaced by a dot. |
|
|
|
|
|
|
|
|
|
|
@ -11,7 +11,7 @@ The ASCII graphic characters are any characters intended to be written, printed, |
|
|
|
### Expected function |
|
|
|
### Expected function |
|
|
|
|
|
|
|
|
|
|
|
```go |
|
|
|
```go |
|
|
|
func PrintMemory(arr [10]int) { |
|
|
|
func PrintMemory(arr [10]byte) { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
``` |
|
|
|
``` |
|
|
@ -24,7 +24,7 @@ Here is a possible program to test your function : |
|
|
|
package main |
|
|
|
package main |
|
|
|
|
|
|
|
|
|
|
|
func main() { |
|
|
|
func main() { |
|
|
|
PrintMemory([10]int{104, 101, 108, 108, 111, 16, 21, 42}) |
|
|
|
PrintMemory([10]byte{'h', 'e', 'l', 'l', 'o', 16, 21, '*'}) |
|
|
|
} |
|
|
|
} |
|
|
|
``` |
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|