Bit shifting for int and long value

image_pdfimage_print

using System;
class MainClass11
{
static void Main()
{
int i = 1;
long lg = 1;
Console.WriteLine(“0x{0:x}”, i << 1); Console.WriteLine("0x{0:x}", i << 33); Console.WriteLine("0x{0:x}", lg << 33); } } [/csharp]

This entry was posted in Data Types. Bookmark the permalink.