![da vinci code movie trilogy da vinci code movie trilogy](https://tutorias.co/wp-content/uploads/2015/06/generaCombinacionesC1.jpg)
If 'float' is converted into 'int' then data present after decimal point is lost. A variable can store the value of the different data types like integer, float, character, enum. To avoid data loss convert lower to higher data type. Even Turbo C++ implemented this in a correct way decades ago. Type casting means converting an expression of given data type into data another type. It must be declared at the start of the block. Global variables solve specific problems by making the variable declaration. A variable that is declared inside the function or block is called a local variable. But in C, its referred to as a global variable.
![da vinci code movie trilogy da vinci code movie trilogy](http://www.softwareandfinance.com/images/TCV_Variables.png)
type variablelist Here, type must be a valid C data type including char, wchar, int, float, double, bool, or any user-defined object and variablelist may consist of one or more identifier names separated by commas. To achieve this, problem must define variable (which holds the result of division) float type and use concept of typecasting specially where the result comes in decimal points. There are many types of variables in c: local variable global variable static variable automatic variable external variable Local Variable. A variable definition specifies a data type and contains a list of one or more variables of that type as follows.
![da vinci code movie trilogy da vinci code movie trilogy](https://image.slidesharecdn.com/introductiontoturbocdatatypes-210823103759/95/introduction-to-turbo-c-data-types-19-638.jpg)
This is because, we declare div variable int type as it shows only integer value and discard the number after decimal the point. In the above output, result of 40/7 shows '5' but the actual result of 40/7 is 5.714285714. Printf("\nDivision of %d & %d is = %d",num1,num2,div)