Consider the following C program:
#include <stdio.h>
#include <ctype.h>
#define EOF -1
void push (int); /* push the argument on the stack */
int pop (void); /* pop the top of the stack */
void flagError ();
int main ()
{ int c, m, n, r;
while ((c = getchar ()) != EOF)
{ if (isdigit (c))
push (c - '0');
else if ((c == '+') || (c == '*'))
{ m = pop ();
n = pop ();
r = (c == '+') ? n + m : n * m;
push (r);
}
else if (c != ' ')
flagError ();
}
printf("%d", pop ());
}
What is the output of the program for the following input?\(5\;\;2\;\;*\;\;3\;\;3\;\;2\;\;+\;\;*\;\;+\)
- A15
- B25
- C30
- D150