GradePack

    • Home
    • Blog
Skip to content
bg
bg
bg
bg

GradePack

Complete the following Go code block so that it declares gra…

Complete the following Go code block so that it declares grades as a map that maps student names to their grades and print out all student names and their grades (DON’T type unnecessary spaces in your answers):   grades := [maptype]{“Alex”: 93.2, “Bob”: 64.1, “Chris”: 70.5}   for [namegrade] := [range] grades {       fmt.Printf(“%s has a grade of %0.1f%%\n”, name, grade)    } Expected output: Alex has a grade of 93.2% Bob has a grade of 64.1% Chris has a grade of 70.5%

Read Details

Given the following declaration: var s string = “GoLang” Mat…

Given the following declaration: var s string = “GoLang” Match each fmt.Println() statement with its output. Recall that the ASCII code of character ‘G’ is 71, and the ASCII code of character ‘o’ is 111.

Read Details

Define a Go’s struct type named BinaryTree that represents a…

Define a Go’s struct type named BinaryTree that represents a binary tree. This struct must have three fields: one field of type int that represents the value at the root of the tree,  one field is a pointer pointing to the left subtree which is also of type BinaryTree one field is a pointer pointing to the right subtree which is also of type BinaryTree

Read Details

The following Go code block will cause a panic: func main(){…

The following Go code block will cause a panic: func main(){  var f func(string) int  fmt.Println(f(“test”))} 

Read Details

What is the output of the following Go code block, assuming…

What is the output of the following Go code block, assuming it is in the program that imports the fmt package: var x int = 20if  x := 10;  x < 11 {   fmt.Println("Value of x inside the if statement:", x)}fmt.Println("Value of x outside the if statement:", x)

Read Details

Given the following Go code block: func test(n int, s string…

Given the following Go code block: func test(n int, s string) int { return n*len(s)} What is the type of the variable t on the left-hand of the following statement? t := test

Read Details

Preemptive scheduling is typically used with interactive ope…

Preemptive scheduling is typically used with interactive operating systems. Match these classic scheduling algorithms: Shortest Remaining Time First, Round Robin, Preemptive Priority, and Compatible Time-Sharing System with their definitions. 

Read Details

For each of the following statements regarding processes, ma…

For each of the following statements regarding processes, mark true or false: 1. When a program is executed, at least one process is created for it. [PROG] 2. A process has at most one thread of execution. [THREAD] 3. Processes are organized in trees. [TREE] 4. A process in the blocked state will eventually be selected to be executed by the scheduler. [block]  

Read Details

For each question about Processes, choose True or False: 1….

For each question about Processes, choose True or False: 1. In the process model, a process has independence of execution. A process does not depend on any other processes executing. [1]  2. Processes are created by System initialization (“init”) or by Process request, which is technically called “spoon”. [2]  3. Another process signaling the termination of the current process is a voluntary Normal Exit [3] 4. All processes have memory areas for the stack, the heap, the pipes, and text while running [4]

Read Details

Select whether each of the following statements is True or F…

Select whether each of the following statements is True or False. Imprecise Interrupts are less complex to implement/handle than Precise Interrupts. [1] “Masking” is a strategy used to manage multiple interrupts. [2] Once the interrupt is handled successfully, the process that caused the interrupt is executed immediately. [3]  Interrupts are invoked at pre-defined moments in time. The developer must decide when interrupts will happen. [4]

Read Details

Posts pagination

Newer posts 1 … 37,624 37,625 37,626 37,627 37,628 … 96,778 Older posts

GradePack

  • Privacy Policy
  • Terms of Service
Top