Stacks
I dont have much programming experience. Is this the way to print the elements in the stack?
#define STACK_SIZE 5
int stack[STACK_SIZE]; // initialise the array
void print(int stack[])
{
int count;
for (count = 0; count < sizeof(stack); count++)
{
printf("%d ", stack[count]);
} // end for
} // print
George N. Bilios
__________________
gbilios
|