Define type casting in C++.



Define type casting in C++...

Answer / Gaurav Goel

Type casting in C++ is a process by which we change (cast) the data type of an expression from one data type to another. This can be achieved using cast operators such as static_cast, dynamic_cast, const_cast, and reinterpret_cast.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ Interview Questions

What is the difference between creating an object, using 'new' and using 'malloc'?

3 Answers   HFG, Siemens,


In C++ what do you mean by Inheritance?

1 Answers   Accenture,


What is the purpose of a constructor? Destructor?

1 Answers   Amazon,


When must you use a constructor initializer list?

1 Answers   Amazon,


What are "pure virtual" functions?

1 Answers   Adobe, Alter, iNautix,


Implement a 2D bit-matrix representing monochrome pixels which will have only OFF/ON values and will take on an average only one bit of memory for each stored bit. How to perform various operations on it?

1 Answers   Adobe,


Write a C++ program to print strings in reverse order.

1 Answers   Amdocs,


What is an algorithm (in terms of the STL/C++ standard library)?

1 Answers   Amazon,


What is a memory leak in C++?

1 Answers   Agilent,


What is wrong with this statement? std::auto_ptr ptr(new char[10]);

1 Answers   Amazon,


Identify the error in the following program. include<iostream> using namespace std; void main() { int num[]={1,2,3,4,5,6}; num[1]==[1]num ? cout<<"Success" : cout<<"Error"; }

1 Answers  


Briefly explain various access specifiers in C++.

1 Answers   Amdocs,


Categories