logo-MindMajix
PostGoLangGoLang
v
victoria mamidi

Posted on 14th June 2024|37 views

0
votes

Go Virtual Machine

Does go run on a virtual machine?

1 answers
Answers
P
Tom 234

Posted on 14th June 2024| views

No, Go does not run on virtual machine let me show you an example which prints function values

package main 

import "fmt" 

func plus(x int, y int) 

int { return x + y } 

func plusPlus(x, y, z int) 

int { return x + y + z } 

func main() { 

funcp := plus 

funcpp := plusPlus 

fmt.Println(funcp) 

fmt.Println(funcpp) 

fmt.Println(funcp(6, 7)) 

fmt.Println(funcpp(6, 7, 8)) }

 

Write your answer

STILL GOT QUERIES?

Get a Live FREE Demo

  • Explore the trending and niche courses and learning maps
  • Learn about tuition fee, payment plans, and scholarships
  • Get access to webinars and self-paced learning videos
Name
Course *
Email *
Phone Number