Type cast operator, C/C++ Programming

What is Type Cast Operator:

 

The float can be converted to integer value or an integer can be converted to float value using type cast operator.

avg = sum/(float)i; //Syntax in C

avg = sum/float(i); //Syntax in C++.  This is like passing the identifier as argument in the function.

There are other type cast operators in C++ which will be discussed later.

·     const_cast

·     static_cast

·     dynamic_cast 

·     reinterpret_cast

Posted Date: 9/20/2012 7:37:55 AM | Location : United States







Related Discussions:- Type cast operator, Assignment Help, Ask Question on Type cast operator, Get Answer, Expert's Help, Type cast operator Discussions

Write discussion on Type cast operator
Your posts are moderated
Related Questions

Public, Private and Protected members: Class members can either be declared in public','protected' or in the 'private' sections of the class. But as one of the features of OOP i

how to make the coding

Q: How can Define an Array? An Array is defined in much the alike manner as ordinary variables except that every array name must be accompanied by a size specification (that is

Write a function that has two int parameters num and n, and returns TRUE when the nth bit in num is 1, otherwise FALSE. This function should use the function in the above problem.

Design and implement a library system that does the following: ? Takes details of a student/library users: first name, last name, other names, user ID number, and nationality. Th


#Smugglers are becoming very smart day by day. Now they have developed a new technique of sending their messages from one smuggler to another. In their new techn