Siva Sai

Siva Sai

222 Articles Published

Articles by Siva Sai

Page 23 of 23

Golang program that uses fallthrough keyword

Siva Sai
Siva Sai
Updated on 18-Apr-2023 3K+ Views

Golang is a powerful programming language that has gained a lot of popularity in recent years. It offers many features and tools that make it easier for developers to create efficient and reliable applications. One of the features that sets Golang apart from other programming languages is the fallthrough keyword. In this article, we will take a look at how you can use the fallthrough keyword in your Golang programs. What is the Fallthrough Keyword in Golang? In Golang, the fallthrough keyword is used in switch statements to transfer control to the next case statement. When a case statement contains ...

Read More

Golang Program that switch on floating-point numbers

Siva Sai
Siva Sai
Updated on 18-Apr-2023 348 Views

In Go, the switch statement can also be used with floating-point numbers. This feature can be useful in certain scenarios, where a floating-point value needs to be compared against different thresholds or ranges. In this article, we will go through an example program that demonstrates the use of switch statement on floating-point numbers. Syntax of Switch Statement with Float The syntax of switch statement with floating-point numbers is the same as that with any other type. The only difference is that the cases need to be specified as floating-point values. switch expression { case value1: ...

Read More
Showing 221–222 of 222 articles
« Prev 1 19 20 21 22 23 Next »
Advertisements