 
  Data Structure Data Structure
 Networking Networking
 RDBMS RDBMS
 Operating System Operating System
 Java Java
 MS Excel MS Excel
 iOS iOS
 HTML HTML
 CSS CSS
 Android Android
 Python Python
 C Programming C Programming
 C++ C++
 C# C#
 MongoDB MongoDB
 MySQL MySQL
 Javascript Javascript
 PHP PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Golang Program to convert Uppercase to Lowercase characters, using binary operator.
In Golang, we can use the binary operators "&" (AND) and "|" (OR) to convert strings from lowercase to uppercase and vice versa. Let's take a simple example and understand how to use these binary operators in Golang.
Example
package main import "fmt" func main(){    fmt.Printf("Lowercase characters using OR operator: ")        for ch:='A'; ch<='Z'; ch++ {       fmt.Printf(string(ch | ' '))    }    fmt.Println()    fmt.Printf("Uppercase characters using AND operator: ")    for ch:='a'; ch<='z'; ch++ {       fmt.Printf(string(ch & '_'))    } }  Output
On execution, it will produce the following output:
Lowercase characters using OR operator: abcdefghijklmnopqrstuvwxyz Uppercase characters using AND operator: ABCDEFGHIJKLMNOPQRSTUVWXYZ
Advertisements
 