MCQ Answer

Which of the following is true about goroutines in Go?

Which of the following is true about goroutines in Go?

गो में गोरोइन्स के बारे में निम्नलिखित में से कौन सा सत्य है?
Topic : Introduction to Go

A. Goroutines are similar to threads in other programming languages.

B. Goroutines are executed sequentially.

C. Goroutines are heavyweight and consume a lot of memory.

D. Goroutines cannot communicate with each other.




Correct Answer is :

A. Goroutines are similar to threads in other programming languages.



Explanation
Goroutines are lightweight concurrent functions in Go that are managed by the Go runtime. They are similar to threads in other programming languages but are more efficient in terms of memory usage and context switching. Goroutines allow for concurrent execution of functions, enabling efficient utilization of multicore processors and enabling highly concurrent applications. Option B is incorrect because goroutines are executed concurrently, not sequentially. Option C is incorrect because goroutines are lightweight and consume minimal memory. Option D is incorrect because goroutines can communicate with each other using channels or other synchronization primitives.
Online Exam Quiz for One day Exam Online Typing Test CCC Online Test 2026 Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Best Website and Software Company in Allahabad