CS1043004a - Computer Science Foundation Exam COMPUTER...

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

View Full Document Right Arrow Icon
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.
Background image of page 1

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

View Full DocumentRight Arrow Icon
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
Background image of page 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;
Background image of page 3

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

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

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 Right Arrow Icon
Ask a homework question - tutors are online