Knowledge Walls
Venkatesan
Hyderabad, Andhra Pradesh, India
Passcode:
Type casting in Introduction of Programming in CPP
1238 Views
Usage 
Type casting is used to convert variable of one datatype to another datatype.
Example 
#include <iostream.h> 
using namespace std; 
int main()
{
short A=57;
int B;
B = (int)X;
cout << "Value of B is:: "<< B <<"\nSize is::"<< sizeof(B);
return 0;
}
Output 
Value of B: 57
size:4
Next Topics
Next lessons of current book.
Previous Topics
Previous lessons of current book.
String Class in CPP of Programming in CPP
String Class in CPP of Programming in CPP
String Class in CPP of Programming in CPP
String Class in CPP of Programming in CPP
Best Lessons of "Programming in CPP"
Top lessons which are viewed more times.
String Class in CPP of Programming in CPP
Math Library Functions of Programming in CPP
String Class in CPP of Programming in CPP
Math Library Functions of Programming in CPP
User-defined Functions of Programming in CPP
Math Library Functions of Programming in CPP
Sub Lessons
  Copyright © 2014 Knowledge walls, All rights reserved
KnowledgeWalls
keep your tutorials and learnings with KnowledgeWalls. Don't lose your learnings hereafter. Save and revise it whenever required.
Click here for more details