You declared i in the for loop :
for (int i=0; i<n; i++) {
it needs to be declared outside the for loop, by where n is declared. The variable j also needs to be declared up there if they are to be accessed outside the for loop.
Also, I am surprised it is accepting your declarations of A, B, and C. I didn't think the C language allowed array variable declaration like that. I believe array dimensions must be a constant expressions.