CS101 Final Term Solved Papers by Moaaz .Aslam u alaikum dear students. If you are looking for Important CS101 Final Term Solved Papers by Moaaz you are visiting the right website. I provided the perfect solution here according to my efforts. If there is any mistake then please correct it to get good grades in your Midterm and Final Term exams. Please verify the answers of all questions before remembering them for your Midterm and Final Term exams.

**JOIN OUR SOCIAL MEDIA GROUPS **

**Also check below Past Papers: **

- In the case of “(A+B)*C”, the closing parenthesis means that a “+” needs to be done.

First. After sending A and B to postfix, we can do the addition - for the presence of parentheses. Then C will be sent to the postfix expression. Will be
- followed by multiplication C and the result A + B. Postfix form
- this expression is AB+C*. Sometimes we have two operators and need to make a
- decision which to use first, as in this case “+” and “*”. In this case we have to see which

CS101 Final Term Solved Papers by Moaaz

- operator has higher priority. Suppose we have a function “prcd(op1,op2)”
- where op1 and op2 are two operators. The function “prcd(op1,op2)” returns TRUE
- if op1 takes precedence over op2, otherwise FASLE. Suppose we call this function using

arguments “*” and “+”, i.e. prcd(*, +), return true. The truth in will also return - case both op1 and op2 are “+”, e.g. if we have A+B+C, it doesn’t matter which +

CS101 Final Term Solved Papers by Moaaz

- we perform first. Calling prcd(+, *) returns false because the priority of * is higher
- than the + operator. The “+” must wait until the * is executed.
- Now we will try to create an algorithm for converting the infix form to the postfix form. For this

pseudocode will be written. We also write loops and if conditions. - Pseudocode is language independent. In this we will use stack

algorithm. Here is the infix expression in string form. The algorithm is like - follows:

Stack