A declaration for a 3 dim array sales which holds sales data for five shops, for 12 months, for three years is given as double sales [5][12][3]; state why double data type is used?
Answers
Answered by
3
"The data type double is used for sales[5][12][3], 3 dimensional array because the sales values may contain decimal digits as it is for sales calculation.
Double data type can hold floating point with double-precision values which can hold small or larger values.
This double data type can accept values up to 64 precision and hence, it is used to declare in 3 dimensional array sales."
Similar questions