Type Casting in C

  • Type Casting allows us to convert one data type into another.

  • In C language, we use cast operator for type casting which is denoted by (type).


Note: It is always recommended to convert lower value to higher for avoiding data loss.

Example to cast int value into float:

Practice Question:


  1. int is a C keyword which is used as a variable name.

  2. Char can only store 1 character.Also,only single sided quotes are used to enclose char.

  3. Only single sided quotes are used to enclose char.

  4. One and only one variable can be at the left side of an expression.

  5. It is assumed that arithmetic operator (*) are already present,when they are not.

  6. No spaces are allowed in variable names

  7. No error.

  8. (*) is repeated.

  9. There is no exponential operator in C.

  10. (*) is missing.

  11. A single variable cannot store more than one value.

  12. No error.

  13. Char can only store a single character.