What is Type casting?

 The process of "converting one data type into an another data type" is called type casting.
Type casting have 2 types, they are
  1. Implicit type casting
  2. Explicit type casting
Example:
                   int x=10;
                   float f=7.6;
                   d=x; // implicit type casting
                   x=int(f);   //explicit type casting

No comments:

Post a Comment