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
We have used logic symbols in the past, but not really though about the actual real devices. Semiconductor companies have taken the logic symbols are manufactured them into logic f

Implement (a part of) electronic election Scenario where following political parties are participating in election: PPP, PML and PTI.  Create a class PollingStation where it stor

Available, and the right kind of programs. My son wants to stop using ice. He has organised detox a number of times, and is always successful. It is the next stage, rehab, where

Syntax rules for writing constructor functions Its name must be similar as that of the class to which it belongs. It is declared with no return type (not even void). Ho

w.a.p to find outWrite a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b.

I need a project on car rental system using c programming only of college level

Ask question #M i want to undersatnd about tree structures like node leaf etcinimum 100 words accepted#

Receive 3 numbers and display them in ascending order from smallest to largest ed#

A string S is said to be "Super ASCII", if it contains the character frequency equal to their ascii values. String will contain only lower case alphabets (''a''-''z'') and the asci

For this program you will add and test 2 new member functions to the IntSLList class posted on the website. The two member functions are: insertByPosn(int el, int pos) Assuming t