Declaring uint8

Report a typo

Declare a uint8 type variable a with the value of 10.

This problem uses the reflect package to check if you properly declared a as a uint8 data type. However, don't be scared! To solve this task, it is not necessary for you to know how the reflect package works.

Sample Input 1:

Sample Output 1:

10
Write a program in Go
package main

import (
"fmt"
"reflect"
)

func solve() uint8 {
// declare an uint8 type variable 'a' with a value of 10 below:
var ?

return a // do not delete this line!
}

// DO NOT delete or modify the contents of the main function!
func main() {
a := solve()
if reflect.TypeOf(a).Name() == "uint8"{
fmt.Println(a)
}
}
___

Create a free account to access the full topic