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 |
What is the difference between creating an object, using 'new' and using 'malloc'?
In C++ what do you mean by Inheritance?
What is the purpose of a constructor? Destructor?
When must you use a constructor initializer list?
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?
Write a C++ program to print strings in reverse order.
What is an algorithm (in terms of the STL/C++ standard library)?
What is a memory leak in C++?
What is wrong with this statement? std::auto_ptr ptr(new char[10]);
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"; }
Briefly explain various access specifiers in C++.