EASY QUESTIONS
0) Does this code compile, if so, whats the output? If not, where is the error message.
![]() |
| nope ! y is undeclared. |
![]() |
| nope again ! no new variables on the left side of the second x := statement. |
1) How long does this program take to run (approximately, assuming print statements take 0 nanoseconds).
2) The following code deadlocks. Why? Fix the following code, in a minimal number of lines, so that "wait1" writes to the "c" channel after 5 nanoseconds without deadlocking.
INTERMEDIATE QUESTIONS
1) Whats wrong with the reference to the LeaseUser type in the code below?
![]() |
| Golang packages don't use fully qualified names for things in the same package! Since you're not importing "ha", you don't need to reference it by the package name.
More coming soon...
|





No comments:
Post a Comment