CSpartA-KEY-May09 - Computer Science Foundation Exam May 8 2009 Computer Science Section 1A Name Grading Criteria PID Max Pts Q1 Q2 Q3 Q4 Q5 Total

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

View Full Document Right Arrow Icon
Computer Science Foundation Exam May 8, 2009 Computer Science Section 1A Name: Grading Criteria PID: Max Pts Type Passing Threshold Student Score Q1 11 DSN 8 Q2 10 ANL 7 Q3 10 ALG 7 Q4 10 ALG 7 Q5 9 ALG 6 Total 50 35 You must do all 5 problems in this section of the exam. Partial credit cannot be given unless all work is shown and is readable. Be complete, yet concise, and above all be neat . Do your rough work on the last page.
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 ) (11 points) Recursion Write a recursive function that encrypts a string using a Caesar cipher. For those of you unfamiliar, a Caesar cipher works by shifting each letter three places in the alphabet, so 'a' becomes 'd', 'b' becomes 'e', 'c' becomes 'f', and so on. Letters at the end of the alphabet wrap around, so 'x', 'y', and 'z' become 'a', 'b', and 'c', respectively. You may assume that the string consists entirely of lowercase letters. As an example, if your function is passed a string containing "computer" then after your function is called, it should contain "frpsxwhu". void caesar_cipher(char* str, int length)
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 09/21/2011.

Page1 / 6

CSpartA-KEY-May09 - Computer Science Foundation Exam May 8 2009 Computer Science Section 1A Name Grading Criteria PID Max Pts Q1 Q2 Q3 Q4 Q5 Total

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online