Identify the invalid literals from the following and write reason for each: 1. 2E3.5 2. “9”
Share
One destination to find everything from exams to study materials.
Exams |
Courses |
QnA |
Study Material
One destination to find everything from exams to study materials.
Exams |
Courses |
QnA |
Study Material
One destination to find everything from exams to study materials.
Exams |
Courses |
QnA |
Study Material
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Answer:
1. 2E3.5 → The mantissa part (3.5) will not be a floating point number. Hence it is invalid
3. ‘hello’ → It is a string hence it must be enclosed in double quotes instead of single quotes. It is invalid