131k views
2 votes
What are the advantages and disadvantage of integers and floating numbers?

User Jomido
by
6.2k points

1 Answer

4 votes

Answer:

Step-by-step explanation:

Advantages of int and disadvantages of float are as following :-

1.Arithmetic operation on int variables are much faster than float variables.

2.int variables does not suffer from precision loss while float variable sometimes suffer from it.

Advantages of float variables and disadvantages of int variables are as following:

1.float variables can represent values between integers.While integers cannot do that.

2.Float can represent much greater range of values than integers.

User Gcahill
by
5.9k points