91-9990449935 0120-4256464 |
Type Casting in CType casting allows us to convert one data type into other. In C language, we use cast operator for type casting which is denoted by (type). Syntax: Note: It is always recommended to convert lower value to higher for avoiding data loss.Without Type Casting: With Type Casting: Type Casting exampleLet's see a simple example to cast int value into float. Output: f : 2.250000
Next TopicFunctions in C
|