short keyword in C#
Keywords are the words in a language that are used for some internal process or represent some predefined actions. short is a keyword that is used to declare a variable which can store a signed integer value from the range -32, 768 to 32, 767. It is an alias of System.Int16.
short variable_name = value;
short keyword occupies 2 bytes (16 bits) space in the memory.
Input: num: 2 Output: num: 2 Size of a short variable: 2 Input: num = 20200 Output: num: 20200 Type of num: System.Int16 Size of a short variable: 2
num: 2 Size of a short variable: 2
num: 20200 Type of num: System.Int16 Size of a short variable: 2 Min value of short: -32768 Max value of short: 32767