Beginners tasks of go language.

Task 1:

Using the previous example, demonstrate how to pass a structure as a function argument and print its values.

Task 2:

Here, you can see the two different structs. The company struct uses the employee struct as an array. Write a program that do the following: – Add three employee using the employee struct (e.g., emp1 := employee{“Amir”, 80000, “Full-Stack Developer”} – Create an array of ‘emplys’ by add the above three records (emplys:=[]employee{ …}) – create a company struct and add values to it (e.g., {“Tetra”, emplys}) – Print company details

Task 3:

Currently, the program output the addresses. Your task is to write a Print() method(s) to display the students data from the student list in the format given below • The strings.Repeat can help you print the ‘=‘ for the specified number of time

Task 4:

Extending task 3, add an array for the subject a student is currently studying. • Calculate hash of the block data and display it


View Github