write a c++ program to convert a data type implicity
Answers
Answered by
4
Answer:
C++ supports four types of casting:
- Static Cast.
- Dynamic Cast.
- Const Cast.
- Reinterpret Cast. Example: #include <iostream> using namespace std; int main() { float f = 3.5; // using cast operator. int b = static_cast < int >(f); cout << b; } Output: 3.
Similar questions