Visual C++ - types and variables

Types and variables are closely related because variables are the most important elements of our program in which we store data, partial results of our calculations. Types tell us what data can be stored in variables.

basic data types

Simple data types that can be numbers, characters, or logical types. They are suitable for storing one value.

type conversions

Using a type conversion we can change the type of existing types. Thanks to this we can overwrite automatic conversion.

variables

variable is used for storing the data. can be declared in different locations and can be used in different locations. it can be distinguished according to the lifetime: they are global or local static variables. it is possible use in the structure or function.
variable declaration variable use

Examples - Visual C++

Visual C++ .NET

Other pieces of example codes:
short y = -(1500 % 60);
y = (long long)(x * y)
signed char y = -(15 % 4);
y = ~x
(float)y / 5
y =(double)(x * y)
Languages: en hu cz sk