Programming Concepts Tutorial

Learn the fundamental concepts of computer programming

Type Casting

Type Casting

Type casting (or type conversion) is the process of converting a variable from one data type to another.

For instance, converting the string "10" to the integer 10 so you can perform math operations on it.

Implicit vs Explicit

  • Implicit: Done automatically by the language (e.g., adding an int to a float yields a float).
  • Explicit: Done manually by the programmer using built-in functions.

Try It Yourself

Edit the code below and click Run to see the result live.

Source Code
Result
Topics