Computer Science, asked by madcrazy595, 8 months ago

Which data type will be used to represent the following

data values and why?

a) Number of months in a year

b) Resident of Delhi or not

c) Mobile number

d) Pocket money

e) Volume of a sphere

f) Perimeter of a square

g) Name of the student

h) Address of the student

Answers

Answered by shreyashichaudhary
8

Answer:

a) int

b) Boolean

c) long

d) int/double

e) double

f) double

g) String

h) String

Explanation:

a) there are 12 months in a year

b) if the person belongs to delhi or not can only be answered in true or false.

c) there are 10 digits of mobile number it will take more bits therefore long will be used.

d) depends on what amount you are getting it will be in numbers only.

e) it can go upto many decimal places.

f) it can go upto many decimal places.

g) a persons name have to be stored in stings

h) an address can contain both numbers and digits therefore, string will be used.

Similar questions