Type Casting in C
In C, type casting / type conversion is a mechanism that allows you to change the data type of a variable.
Sometimes, we need to perform different types of arithmetic operations on variables and for this purpose, there must be compatibility between the data types. For example, we can not add a string in an integer variable. If our variable is in string variable and we want to perform arithmetic operation on it, we have to convert it into int.
Practice Exercises
Complete these exercises to reinforce your learning and earn XP
Sign in to track your progress and earn XP!
Exercise 1 of 2Easy
Which of the following is a best practice in programming?
10 XP~2 min
Exercise 2 of 2Easy
Code that is easy to read and understand is called ___ code.
10 XP~2 min