Give the difference between the type casting and automatic type conversion. Also tell a suitable C++ code to illustrate both.



Give the difference between the type casting and automatic type conversion. Also tell a suitable C++..

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

Post New Answer

More C++ General Interview Questions

Write bites in Turbo c++ Header ("Include") Files.

1 Answers  


What is constructor c++?

1 Answers  


What are stacks?

1 Answers  


Tell me can a pure virtual function have an implementation?

1 Answers  


Can we inherit constructor in c++?

1 Answers  


What are the five types of inheritance in C++?

1 Answers  


Is python better than c++?

1 Answers  


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)

1 Answers  


Why do we use iterators?

1 Answers  


What is c++ in english?

1 Answers  


Define a nested class. Explain how it can be useful.

1 Answers  


What does ctime() do?

1 Answers  


Categories