What is the difference between make and new?
Answer / Deepti Singh
In Go, `make` is a built-in function used for creating managed values such as maps, slices, channels, and structures. On the other hand, `new` is an operator that allocates memory on the heap for a custom type but does not initialize it.
| Is This Answer Correct ? | 0 Yes | 0 No |
Does go programming language support operator overloading?
Does go (golang) support method overloading?
What is a string literal in go programming?
How will you access command line arguments in a go program?
What is go routine in go? How you can stop go routine?
Explain what a modular programming language is?
What is go (golang) programming language?
What is type assertion in go? What does it do?
What are channels and how can you use them in golang?
What is the syntax for creating a function?
Does go support pointer arithmetics?
What are packages in go language?