Keywords are the words in a language that are used for some internal process or represent some predefined actions. int is a keyword that is used to declare a variable which can store an integral type of value (signed integer) the range from -2,147,483,648 to 2,147,483,647. It is an alias of System.Int32.
int variable_name = value;
Int keyword occupies 4 bytes (32 bits) space in the memory.
Input: num: -245 Output: num: -245 Size of an int variable: 4 Input: num = 7923645 Output: Type of num: System.Int32 num: 7923645 Size of a int variable: 4
num: -245 Size of a int variable: 4
Type of num: System.Int32 num: 7923645 Size of a int variable: 4 Min value of int: -2147483648 Max value of int: 2147483647
Error: When we input wrong integer and also input number beyond the range
Constant value `2147483650′ cannot be converted to a `int’
Cannot implicitly convert type `double’ to `int’
- C# | this Keyword
- var keyword in C#
- byte Keyword in C#
- uint keyword in C#
- float keyword in C#
- C# | finally keyword
- LINQ | Let Keyword
- C# | as Operator Keyword
- C# | is Operator Keyword
- Is vs As operator keyword in C#
- Static keyword in C#
- ushort keyword in C#
- double Keyword in C#
- void Keyword in C#
- ulong keyword in C#
- long keyword in C#
- short keyword in C#
- sbyte Keyword in C#
- bool Keyword in C#
- char keyword in C#
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.