Draw the UML diagram of the class queueADT. (8)
Consider the following statements:
long long num;
int digit1, digit2;
Show what is output by the following segment of code, if the input is 837298651020706. (4, 10)
cin >> num;
num = abs(num);
while (num > 0)
{
stack.push(num % 10);
num = num / 10;
}
while (!stack.isEmptyStack())
queue.addQueue(stack.top());
stack.pop();
if (!queue.isEmptyQueue())
digit1 = queue.front();
queue.deleteQueue();
while (!queue.isEmptyQueue())
digit2 = queue.front();
cout <><>
digit1 = digit2;
cout
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here