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
How to specify different memory sections for a variable using #Pragma?

The project is to design and write a C++11/FLTKgame program with a graphical user interface.The game is based on "pancake sorting," as described at http://en.wikipedia.org/wiki/P

Explain Register Variable Computers have internal registers, which are used to keep data temporarily, before any operation can be performed. Intermediate results of the calcula

Raj is a newbie to the programming and while learning the programming language he came to know the following rules: · Each program must start with ''{'' and end with ''}''

Project Description: I want an experienced programmer to program an RFID tag that will be read (maybe also written), and perform a call to a Filmmaker Pro 13 database. Skills

Identify 2 to 3 existing algorithms commonly used for object tracking. Algorithms should be in C or written in MATLAB language. Document these algorithms in flowcharts and run thes

Precautions with function overloading Function overloading is a boon to designers, since dissimilar names for same functions need not be thought of, which often is a cumbersome

The digital signal is one which only consists of two states i.e. logic '1'   (+5 volts) and logic '0' (0 volts). Various electronic blocks use logic and these form the basis of a m

pseudo code that will determine if the number is prime or composite

Introduction:  This assignment requires a knowledge of variables (integers, char types), loops, conditionals, switch, functions, char arrays, string arrays, number arrays, struc