What is the difference between implicit type conversion and explicit type conversion?
Answers
Answered by
13
Answer:1.Implicit conversion is used to convert(or store) a value of lower data type into a larger datatype,
2. User intervision is not necessary,
3.Does not result in loss of data,
Whereas,
1.Explicit conversion is used to conver a value of higher datatype into a lower datatype value,
2.User intervision is necessary
3. May result in the loss of data.
Explanation:IMPLICIT:
char c='a';
int n=c;
EXPLICIT:
double d=5.56;
int m=(int)d;
This can help u bby
2. User intervision is not necessary,
3.Does not result in loss of data,
Whereas,
1.Explicit conversion is used to conver a value of higher datatype into a lower datatype value,
2.User intervision is necessary
3. May result in the loss of data.
Explanation:IMPLICIT:
char c='a';
int n=c;
EXPLICIT:
double d=5.56;
int m=(int)d;
This can help u bby
Answered by
1
- When the data type gets converted automatically into its higher type, it is known as implicit type conversion whereas when the data type gets converted to another type depending upon the user's choice , it is known as explicit type conversion.
- In implicit type conversion, it gets converted without any intervention of the user whereas In explicit type conversion, it gets converted after after the user intervention.
- e.g. of implicit type conversion :-
int a; float b; float c;
c = a+b;
e.g. of explicit type conversion :-
int a; float b; double c;
b = (float) (a*c);
Similar questions
Math,
4 months ago
Computer Science,
4 months ago
Geography,
4 months ago
Math,
9 months ago
Math,
9 months ago