C – Typecasting

Type casting in C Language converts one type to another. In C language, we use the cast operator for type casting:

Let us now see some examples of Type Conversion and convert one datatype to another.

Convert int to float in C

We typecast and convert int to float type:

Output

Convert int to double in C

We typecast and convert int to double type:

Output

If you liked the tutorial, spread the word and share the link and our website Studyopedia with others:


For Videos, Join Our YouTube Channel: Join Now


Read More:

C - Math Functions
C - Command Line Arguments
Studyopedia Editorial Staff
contact@studyopedia.com

We work to create programming tutorials for all.

No Comments

Post A Comment

Discover more from Studyopedia

Subscribe now to keep reading and get access to the full archive.

Continue reading