Exam 1 Topics.pdf - Exam​ ​1 Exam​ ​Structure 1...

This preview shows page 1. Sign up to view the full content.

You've reached the end of this preview.

Unformatted text preview: Exam​ ​1 Exam​ ​Structure 1. Approximately​ ​5​ ​questions​ ​total ○ 2​ ​questions​ ​focused​ ​on​ ​translating​ ​between​ ​C​ ​and​ ​LC-3​ ​(e ​ xample​ ​problems​) ○ 3​ ​questions​ ​focusing​ ​on​ ​C​ ​concepts i. Will​ ​include​ ​short​ ​CodeLab-like​ ​code​ ​snippets ○ General​ ​statement:​ ​This​ ​will​ ​include​ ​all​ ​material​ ​covered​ ​up​ ​to​ ​(but​ ​not​ ​including) functions. 2. You​ ​can​ ​expect​ ​something​ ​like​ ​a​ ​mix​ ​between​ ​these​ ​two​ ​testing​ ​formats ○ Example​ ​1​ ​(​Tuck​) ○ Example​ ​2​ ​(​Byrd​) ○ Note​ ​-​ ​there​ ​may​ ​be​ ​some​ ​questions​ ​in​ ​these​ ​two​ ​examples​ ​on​ ​material​ ​not included​ ​in​ ​the​ ​“Topics”​ ​list​ ​below​ ​(example​ ​-​ ​extended​ ​function​ ​problems).​ ​If​ ​it​ ​is not​ ​included​ ​there,​ ​you​ ​will​ ​not​ ​be​ ​tested​ ​on​ ​it​ ​for​ ​Exam​ ​1. 3. No​ ​cheat​ ​sheets,​ ​but​ ​I​ ​will​ ​provide​ ​you​ ​with​ ​C​ ​and​ ​LC-3​ ​reference​ ​sheets​ ​that​ ​contain​ ​a precedence​ ​table,​ ​a​ ​list​ ​of​ ​all​ ​LC-3​ ​instructions,​ ​and​ ​the​ ​ASCII​ ​table. 4. Please​ ​be​ ​aware​ ​of​ ​the​ ​testing​ ​policies​ ​before​ ​you​ ​come.​ ​ ​You​ ​will​ ​see​ ​something​ ​like this​ ​at​ ​the​ ​top​ ​of​ ​the​ ​exam​ ​paper.​ ​Read​ ​it​ ​now​ ​so​ ​you​ ​can​ ​prepare​ ​accordingly: This​ ​is​ ​a​ ​closed​ ​book​ ​and​ ​closed​ ​notes​ ​test.​ ​ ​You​ ​are​ ​not​ ​allowed​ ​to​ ​have​ ​anything​ ​on​ ​your​ ​desk other​ ​than​ ​pencil​ ​and​ ​this​ ​exam​ ​paper​ ​during​ ​the​ ​test;​ ​this​ ​includes​ ​calculators​ ​or​ ​electronic assistance​ ​of​ ​any​ ​kind​ ​–​ ​even​ ​cell​ ​phones​. You​ ​may​ ​not​ ​leave​ ​to​ ​go​ ​to​ ​the​ ​restroom.​ ​ ​Please​ ​go​ ​before​ ​the​ ​exam​ ​starts. You​ ​may​ ​not​ ​ask​ ​questions.​ ​ ​If​ ​something​ ​is​ ​confusing,​ ​write​ ​a​ ​note​ ​beside​ ​the​ ​question​ ​and explain​ ​your​ ​assumptions. You​ ​must​ ​show​ ​all​ ​of​ ​your​ ​work​ ​on​ ​this​ ​exam.​ ​ ​You​ ​will​ ​not​ ​be​ ​allowed​ ​to​ ​turn​ ​in​ ​additional sheets​ ​of​ ​paper. Read​ ​and​ ​sign​ ​the​ ​following​ ​statement.​ ​ ​Failure​ ​to​ ​sign​ ​the​ ​statement​ ​will​ ​result​ ​in​ ​a​ ​zero​​ ​on​ ​the exam. Topics 1. Write​ ​a​ ​complete​ ​C​ ​program​ ​using​ ​correct​ ​syntax a. It​ ​should​ ​compile​ ​without​ ​errors​ ​and​ ​have​ ​no​ ​major​ ​logical​ ​bugs 2. C​ ​operators,​ ​precedence,​ ​evaluation​ ​of​ ​expressions a. Explain​ ​the​ ​meaning​ ​of​ ​all​ ​C​ ​operators​ ​(covered​ ​so​ ​far) b. Identify​ ​an​ ​LC-3​ ​implementation​ ​of​ ​a​ ​C​ ​operator c. Produce​ ​an​ ​implementation​ ​of​ ​the​ ​following​ ​C​ ​operators​ ​in​ ​LC-3 i. =​ ​(assignment) ii. +​ ​(addition) iii. -​ ​(subtraction,​ ​unary​ ​minus) iv. &​ ​(bitwise-and) v. ~​ ​(bitwise-not) vi. ++​ ​(increment) vii. !​ ​(logical-not) viii. &&​ ​(logical-and) d. Evaluate​ ​an​ ​expression​ ​according​ ​to​ ​its​ ​meaning​ ​in​ ​C e. Identify​ ​precedence​ ​of​ ​operators​ ​within​ ​a​ ​C​ ​expression f. Interpret​ ​the​ ​type​ ​of​ ​a​ ​C​ ​expression 3. Implement​ ​or​ ​explain​ ​code​ ​using​ ​all​ ​C​ ​statements a. List​ ​of​ ​C​ ​statements i. variable​ ​declarations ii. expression​ ​statements iii. return iv. if-else v. switch​ ​(+​ ​case) vi. while vii. do-while viii. for ix. break​ ​(know​ ​difference​ ​between​ ​switch​ ​and​ ​loop​ ​usage) x. continue​ ​(only​ ​useful​ ​in​ ​loops) 1. Know​ ​how​ ​it’s​ ​different​ ​depending​ ​on​ ​the​ ​loop​ ​it’s​ ​used​ ​within xi. compound​ ​statements b. Interpret​ ​the​ ​execution​ ​of​ ​nested​ ​statements​ ​and​ ​show​ ​their​ ​output​ ​using​ ​any combination​ ​of​ ​the​ ​following i. If-else ii. Loops:​ ​do-while,​ ​for,​ ​while iii. Switch​ ​statements c. Interpret​ ​LC-3​ ​code​ ​as​ ​being​ ​a​ ​particular​ ​kind​ ​of​ ​statement d. Implement​ ​LC-3​ ​code​ ​for​ ​the​ ​following​ ​statements: i. Expression​ ​statement​ ​(for​ ​operators​ ​shown​ ​above) ii. while-loop 4. 5. 6. 7. iii. if-else​ ​statement iv. for-loop Convert​ ​a​ ​flowchart/pseudocode​ ​to​ ​legal​ ​C​ ​code,​ ​or​ ​convert​ ​legal​ ​C​ ​code​ ​to​ ​a​ ​detailed flowchart. Note​ ​that​ ​material​ ​may​ ​come​ ​from:​ ​TopHat​ ​questions,​ ​lecture​ ​material,​ ​anything​ ​covered in​ ​class​ ​up​ ​to​ ​but​ ​not​ ​including​ ​functions,​ ​problem​ ​sessions,​ ​and​ ​program​ ​1 Be​ ​able​ ​to​ ​write​ ​and​ ​use​ ​simple​ ​statements​ ​including​ ​printf,​ ​scanf,​ ​and​ ​getchar. Challenge​ ​questions​ ​(extra​ ​credit) a. These​ ​may​ ​be​ ​on​ ​anything​ ​covered​ ​in​ ​class​ ​up​ ​through​ ​the​ ​most​ ​recent lecture​ ​(Lec​ ​8)​,​ ​homeworks,​ ​problem​ ​session,​ ​TopHat​ ​questions,​ ​or​ ​program​ ​1 ...
View Full Document

  • Spring '08
  • TUCK

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern