Complete the code to declare a struct named Person.
type Person [1] {
Name string
Age int
}In Go, struct is used to define a new data type that groups fields.
Complete the code to create a variable of type Person.
var p [1] PersonThe short declaration operator := is used to declare and initialize variables in Go.
Fix the error in the code to access the Age field of a Person struct.
fmt.Println(p[1]Age)In Go, the dot . operator is used to access fields of a struct.
Complete the code to create a struct literal for Person with Name "Alice" and Age 30.
p := Person{Name: "Alice", [1]: 30}Struct literals use curly braces {} and field names to assign values.
Fill all three blanks to define a struct, create a variable, and assign a value.
type [1] struct { Name string } var p [2] [3]
First, define the struct type. Then declare a variable of that type and assign a struct literal.
