Integer OverFlow

image_pdfimage_print
   
  

using System;
   
class IntegerOverFlow
{
    static void Main(string[] args)
    {
        short s = 32767;
        s++;
        Console.WriteLine(s);
   
        ushort us = 0;
        us--;
        Console.WriteLine(us);
    }
}

   
     


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