Home »
Code Examples »
Golang Code Examples
Golang - Demonstrate the concept of infinite recursion Code Example
The code for Demonstrate the concept of infinite recursion
package main
import (
"fmt"
)
func printSomething() {
fmt.Println("Hello, world!")
printSomething()
}
func main() {
printSomething()
}
/*
Output:
Hello, world!
Hello, world!
Hello, world!
Hello, world!
Hello, world!
Hello, world!
Hello, world!
Hello, world!
...
...
...
*/
Code by IncludeHelp,
on March 1, 2023 07:08