1. Multiplying Array Based Stacks?

How would one go about doing this? It's like doing second grade multiplication, like:

Code:
```  1234
11
____
1234
12340
+
13574```
like that. I'm trying alot of different things but ive managed to come up with some really buggy code. When responding, don't just give me code, but suggestions on what to do change/do. Heres my function. It makes use of push, pop, etc.

Code:
```stack multiply(stack stackOne, stack stackTwo)
{
stack copyStack;
copyStack.top = -1;
stack carry;
carry.top = -1;
stack runOne;
runOne.top = -1;

int x, y, limitOne, limitTwo, lhs, rhs, test, quotient, carryInt, total = 0, digit;
int limitThree, z;
limitOne = stackOne.top;
limitTwo = stackTwo.top;

for(x = 0; x <= limitTwo; x++)
{
copyStack = stackOne;
pop(&stackTwo, &rhs);

for(y = 0; y <= limitOne; y++)
{
if(test = isEmpty(&copyStack) != 1)
lhs = 1;
else
pop(&copyStack, &lhs);

if(test = isEmpty(&carry) != 1)
carryInt = 0;
else
pop(&carry, &carryInt);

quotient = (lhs * rhs) + carryInt;

if(quotient > 10)
{
digit = quotient % 10;
push(&runOne, digit);
carryInt = (quotient - digit) / 10;
push(&carry, carryInt);
}
else if(quotient == 10)
{
push(&runOne, 0);
push(&carry, 1);
}
else if(quotient < 10)
{
push(&runOne, quotient);
}
if(y == stackTwo.top-1)
{
limitThree = carry.top;
for(z = 0; z <= limitThree; z++)
pop(&carry, &carryInt);
push(&runOne, carryInt);
}
}
}
return runOne;
}```

2. Code:
```                 if(test = isEmpty(&carry) != 1)
carryInt = 0;```
What's test for?

Code:
```                 if(quotient > 10)
{
digit = quotient % 10;
push(&runOne, digit);
carryInt = (quotient - digit) / 10;
push(&carry, carryInt);
}
else if(quotient == 10)
{
push(&runOne, 0);
push(&carry, 1);
}
else if(quotient < 10)  // Could be else
{
push(&runOne, quotient);
}```

3. test is for the function isEmpty. if ifEmpty returns 0, than stack is not empty. otherwise itll return empty

4. > if(test = isEmpty(&carry) != 1)
I think he meant you should look at it more closely

You've written
if(test = (isEmpty(&carry) != 1) )

What most people want, when they have an assignment is
if( (test = isEmpty(&carry)) != 1)

Mind you, since you don't use the variable, it's just a waste of space

Since you've stated that it will return 0 when the stack is not empty, you can just write
if ( isEmpty(&carry) )