Following is C like pseudo code of a function that takes a numb
argument, and uses a stack S to do processing. What does the
function do in general?
void fun(int n) {
Stack S; // Say it creates an empty stack 5
while (n > 0)
{
This line pushes the value of n%2 to stack S
push(&S, nx2);
n = n/2;
}
// Run while Stack s is not empty
while (!isEmpty())
printf("%d", pop({5)); 1! pop an element from s and
}
Answers
Answered by
3
Answer:
Buymymobile coustmer care number 8102769758//8102769758 Buymymobile coustmer care number 8102769758//8102769758
Explanation:
Buymymobile coustmer care number 8102769758//8102769758
Buymymobile coustmer care number 8102769758//8102769758Buymymobile coustmer care number 8102769758//8102769758Buymymobile coustmer care number 8102769758//8102769758Buymymobile coustmer care number 8102769758//8102769758 Buymymobile coustmer care number 8102769758//8102769758 Buymymobile coustmer care number 8102769758//8102769758
Similar questions
Social Sciences,
1 month ago
Physics,
1 month ago
Science,
1 month ago
Political Science,
3 months ago
Math,
9 months ago
Math,
9 months ago