The following code Compiled but gave me an error (credit.c:21:7: runtime error: index 15 out of bounds for type 'int [15]') on the last line included while running:
int m;
int r;
int counter;
int main (void)
{
printf ("Card #:");
long long card = get_long_long();
int multiplied[15];
int reg[15];
counter = 1;
m = 0;
r = 0;
do {
if (counter % 2 == 0){
r++;
reg[r] = card % 10;
If anyone knows what this means please help. I initially waned to initiate array at 1 and add as needed later via a variable in the brackets but it wouldn't let me.