GOLANG_INTERVIEW Telegram 214
Что выведет код ?

package main

import "fmt"

func reverse(arr [6]int) {
for i, j := 0, len(arr)-1; i < j; i, j = i+1, j-1 {
arr[i], arr[j] = arr[j], arr[i]
}
}

func main() {
arr := [...]int{5: 0}
for i := 1; i < 5; i++ {
arr[i] = i + 1
}
reverse(arr)
fmt.Println(arr)
}

Решение

@golang_interview
👍5🔥3🤔2



tgoop.com/golang_interview/214
Create:
Last Update:

Что выведет код ?

package main

import "fmt"

func reverse(arr [6]int) {
for i, j := 0, len(arr)-1; i < j; i, j = i+1, j-1 {
arr[i], arr[j] = arr[j], arr[i]
}
}

func main() {
arr := [...]int{5: 0}
for i := 1; i < 5; i++ {
arr[i] = i + 1
}
reverse(arr)
fmt.Println(arr)
}

Решение

@golang_interview

BY Golang вопросы собеседований




Share with your friend now:
tgoop.com/golang_interview/214

View MORE
Open in Telegram


Telegram News

Date: |

Content is editable within two days of publishing But a Telegram statement also said: "Any requests related to political censorship or limiting human rights such as the rights to free speech or assembly are not and will not be considered." Hui said the time period and nature of some offences “overlapped” and thus their prison terms could be served concurrently. The judge ordered Ng to be jailed for a total of six years and six months. The visual aspect of channels is very critical. In fact, design is the first thing that a potential subscriber pays attention to, even though unconsciously. When choosing the right name for your Telegram channel, use the language of your target audience. The name must sum up the essence of your channel in 1-3 words. If you’re planning to expand your Telegram audience, it makes sense to incorporate keywords into your name.
from us


Telegram Golang вопросы собеседований
FROM American