{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# CS1043004a - Computer Science Foundation Exam COMPUTER...

This preview shows pages 1–4. Sign up to view the full content.

Computer Science Foundation Exam COMPUTER SCIENCE I Section A No Calculators! GRADING SCHEME Name: SSN: Score: 50 In this section of the exam, there are Three (3) problems You must do all of them. The weight of each problem in this section is indicated with the problem. The algorithms in this exam are written in C programming language notation. Partial credit cannot be given unless all work is shown. As always, be complete, yet concise, and above all be neat . Credit cannot be given when your results are unreadable.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
1. Convert the following infix expression to postfix, showing the values in the operator stack at each indicated point in the infix string (points 1, 2, and 3), in the boxes below. You may add more boxes for each position if necessary to do so. [ 12 points ] A – D – L * T 1 + B / ( K – F * P / 2 Y ) – 3 E + M GRADING SCHEME: Box 1, 2, 3 [ 3 points each] Resultant expression [ 3 points ] / - ( * / - + - 1 2 3 Resulting Postfix Expression : A D – L T * B K F P * Y / / + E M + 2
2. What is the output of the following program? If you think the program is not going to run because of some errors, point out those erros. [ 10 points ] #include <stdio.h> int alpha (int *px , int y , int x[], int *pz); int main() { int i, a= 2, b =10 ,c = 9;

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 7

CS1043004a - Computer Science Foundation Exam COMPUTER...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online