Swift Program to Perform the Bitwise OR Operation

You are currently viewing Swift Program to Perform the Bitwise OR Operation

Swift program to perform the bitwise OR operation

// Swift program to the 
// perform bitwise OR (|) operation

import Swift;

var num1 = 5;
var num2 = 2;
var res = 0;

res = num1 | num2;

print(res);

output

7

...Program finished with exit code 0
Press ENTER to exit console.

Ranjith

Hi, I'm Manoj a full-time Blogger, YouTuber, Affiliate Marketer, & founder of Coding Diksha. Here, I post about programming to help developers.

Leave a Reply