Give the difference between the type casting and automatic type conversion. Also tell a suitable C++ code to illustrate both.
Answer / Sudhir Singh Chahar
Type casting is intentionally converting a value from one data type to another explicitly using cast operators (static_cast, dynamic_cast, const_cast, reinterpret_cast). Automatic type conversion, on the other hand, occurs automatically when an operation involves operands of different types and there is an implicit conversion between those types.
| Is This Answer Correct ? | 0 Yes | 0 No |
Write bites in Turbo c++ Header ("Include") Files.
What is constructor c++?
What are stacks?
Tell me can a pure virtual function have an implementation?
Can we inherit constructor in c++?
What are the five types of inheritance in C++?
Is python better than c++?
Write a single instruction that will store an EVEN random integer between 54 and 212 inclusive in the variable myran. (NOTE only generate EVEN random numbers)
Why do we use iterators?
What is c++ in english?
Define a nested class. Explain how it can be useful.
What does ctime() do?