Type Casting in CTypecasting allows us to convert one data type into other. In C language, we use cast operator for typecasting which is denoted by (type). Syntax: Note: It is always recommended to convert the 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 the float. Output: f : 2.250000
Next TopicFunctions in C
|
JavaTpoint offers too many high quality services. Mail us on h[email protected], to get more information about given services.
JavaTpoint offers college campus training on Core Java, Advance Java, .Net, Android, Hadoop, PHP, Web Technology and Python. Please mail your requirement at [email protected].
Duration: 1 week to 2 week