CBSE Class 11 Computer Science Question 83 of 173

Data Handling — Question 12

Back to all questions
12
Question

Question 12

What is the difference between implicit type conversion and explicit type conversion?

Answer

Implicit Type ConversionExplicit Type Conversion
An implicit type conversion is automatically performed by the compiler when differing data types are intermixed in an expression.An explicit type conversion is user-defined conversion that forces an expression to be of specific type.
An implicit type conversion is performed without programmer's intervention.An explicit type conversion is specified explicitly by the programmer.
Example:
a, b = 5, 25.5
c = a + b
Example:
a, b = 5, 25.5
c = int(a + b)
Answer