“Go string” Kode Jawaban

variabel golang dalam string

package main

import (
	"fmt"
)

func main() {
	hello := "hello"
	helloWorld := fmt.Sprintf("%s world", hello)
	fmt.Println(helloWorld)
}
Bearbite

Go string

// using var
var name1 = "Go Programming"

// using shorthand notation
name2 := "Go Programming"
SAMER SAEID

GO Golang String

// Program to create a string in Golang

package main
import "fmt"

func main() {

  // creating string using var
  var message1 = "Hello,"

  // creating string using shorthand notation
  message2 := "Welcome to Programiz"

  fmt.Println(message1)
  fmt.Println(message2)
}
SAMER SAEID

String di Golang

str := "Hello"
Harendra

Jawaban yang mirip dengan “Go string”

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya