Wat is type conversion ???and its type explicit and implicit | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Wat is type conversion ???and its type explicit and implicit

how to convert from one data type to other ??

7th Dec 2016, 6:08 AM
TOYS JUNCTION
TOYS JUNCTION - avatar
1 Answer
0
type conversion means converting from 1 data type to another data type. there r 2 types: implicit type conversion & explicit type conversion implicit: float a=3.5; int b; b=a; cout<<a<<b; o/p- 3.5 3 here the compilers do automatic type conversion float to int. Explicit: float ans; ans=3/2; cout<<ans; ans=float(3/2); cout<<ans; o/p: 1 1.5 hope I answered d question .happy coding
7th Dec 2016, 6:16 AM
Rajiv Puranik
Rajiv Puranik - avatar