I just wanted to know if these are appropriate declarations
digits is an array of 10 integers = int digits [10]
rates is an array of 6 floats = float rates [10]
I just wanted to know if these are appropriate declarations
digits is an array of 10 integers = int digits [10]
rates is an array of 6 floats = float rates [10]
digits is good, rates isn't.
But make sure you know 10 and 6 is how many, not the size.Code:int digits[10]; double rates[6];
And that start indexing at 0.
So you have digits[0] through digits[9].
Code://declared earlier digits[0] = 555; //First value in array gets 555 digits[9] = 323; //Last value in array gets 323 rates[4] = 99.99; // 5th value in rates array gets 99.99