Electronic Circuits - Electronic Tutorials - Electronic Hobby Projects - A Complete Electronic Resource Centre

C Language Programming Library Reference Guide

Products

Sitemap

Online
Calculators

Circuits (A-C)

Circuits (D-O)

Circuits (P-Z)

Tutorials


 
Google
 
Web Hobbyprojects.com

References - Typecasting

Typecasting allows a variable to act like a variable of another type. The method of typecasting is done by prefixing the variable type enclosed by parenthesis before the variable name. The actual variable is not modified.

Example:

float index=3; int loop=(int)index;
This causes index to be typecasted to act like an int.

 

 

 

 

 

 

Search
Custom Search

<<<  Back to C Language Library Reference Guide

<<<  Back to Electronics Tutorials