Computer Science, asked by rxharrisns, 7 months ago

Identify the type of literals for each:

(i) 123

(ii) “Hello‟

(iii) 345.55

(iv) 10+4j​

Answers

Answered by mad210203
1

1. Integer

2. String

3. Float

4. Complex number

Explanation:

1. 123

  • The above literal contains numbers.
  • So, it is a literal of integer type.

2. “Hello‟

  • The above literal contains characters.
  • It is a group of characters.
  • So, it is a literal of string type.

3. 345.55

  • The above literal contains decimal numbers.
  • So, it is a literal of float type.

4. 10+4j​

  • The above literal contains a real part and imaginary part.
  • As it contains real part and imaginary part, it will be a complex number.
  • So, it is a literal of complex number.
Answered by emilabraham931
0

Answer:

1. integer

2.string

3.float

4.complex number

Similar questions