EOD: #2
E.O.D.
Error of the Day
Error of the Day
Answer to EOD#1: HD got it right. the "++" increment operator was on the wrong side causing the variable to only increment after it was already passed!
E.O.D. #2
This one is tricky! I couldn't figure it out, but hey I rushed cuz I was busy today D: 6 classes! Anyway hope you have better luck then me

What Does it do?
The point of this code is to multiply together to different matrices and save the product in the result matrix and print it in the console window. But of course as you know it doesn't work correctly. However it still compiles and runs and prints data So what's the problem? that's for you to figure out. >:P
Code:
#include <stdio.h>
#include <iostream>
static void matrix_multiply(
int result[3][3], /*The result*/
int matrix1[3][3], /*One multiplicand*/
int matrix2 [3][3] /*The other multiplicand*/
)
{
/* Index into elements of the elements of the matrix*/
int row, col, element;
for(row = 0; row <3; ++row)
{
for(col = 0; col < 3; ++col)
{
result[row][col] = 0;
for(element = 0; element < 3; ++element)
{
result[row][col] +=
matrix1[row][element] *
matrix2[element][col];
}
}
}
}
/*******************************************************
* matrix_print -- Output the matrix *
*******************************************************/
static void matrix_print(int matrix[3][3] /* The matrix to print*/ )
{
int row, col; /*Index into matrix*/
for(row=0; row < 3; ++row)
{
for(col = 0; col <3; ++col)
{
printf("%o\t", matrix[row][col]);
}
printf("\n");
}
}
int main(void)
{
/* One matrix for multiplication */
int matrix_a[3][3] = {
{45,82,26},
{32,11,13},
{89,81,25}
};
/* Another matrix for multiplication */
int matrix_b[3][3] = {
{32,43,50},
{33,40,52},
{20,12,32}
};
/* Place to put result*/
int result[3][3];
matrix_multiply(result, matrix_a, matrix_b);
matrix_print(result);
system("pause");
return(0);
}

Ok. This one is very pretty difficult so I will be including some hints. If you don't want any hints don't look down and turn around and you might want to zip up your fly while your at it.
The Hints are written in white so you have to highlight them to see 
-----------------------------------------HINTS---------------------------------------
HINT#1:Hmmm... have you looked at the output? There's no 8's or 9's in it?
HINT#2: Have you tried running the program with other numbers still the same effect?
HINT#3: Do you know your escape character sequences?
HINT#4: This site might help: http://ecet.calumet.purdue.edu/~ofar...ent/printf.pdf
LAST HINT!: octal? decimal?
-----------------------------No More Hints Sorry----------------------------
Post what you think it is. Answer will be revealed tomorrow in the final EOD for this week.
