{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

midterm - CS 352 Compilers Principles and Practice Mid-term...

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

View Full Document Right Arrow Icon
CS 352 – Compilers: Principles and Practice Mid-term Examination, 3/11/10 Instructions: Read carefully through the whole exam first and plan your time. Note the relative weight of each question and part (as a percentage of the score for the whole exam). The total points is 100 (your grade will be the percentage of your answers that are correct). This exam is closed book, closed notes . You may not refer to any book or other materials. You have 75 minutes to complete all three (3) questions. Write your answers on this paper (use both sides if necessary). Name: Student Number: Signature:
Background image of page 1

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

View Full Document Right Arrow Icon
1. (Scanning; 25%) Certain assemblers form their integer literals in the following way. Binary literals comprise one or more binary digits ( 0 , 1 ) followed by the letter B . Octal literals consist of one or more octal digits ( 0 through 7 ) followed by the letter Q ( O looks too much like 0 ). Hexadecimal literals comprise at least one decimal digit ( 0 through 9 ), followed by zero or more hexadecimal digits ( 0 through 9 and A through F ) followed by the letter H . Decimal literals consist of at least one decimal digit optionally followed by the letter D .
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.

{[ snackBarMessage ]}