Unformatted text preview:

The American University in Cairo Computer Science Department CSCI 106 Dr KHALIL EXAM I Spring 2004 Last Name ID First Name Form I EXAMINATION INSTRUCTIONS Do not turn this page until asked to do so Exam time is 60 minutes Put the answers on the same question sheet do not use any additional papers even for scratch Write your name ID section no in the indicated places Read the exam instructions Read the honesty policy Sign the following statement HONESTY POLICY Cheating in Exams is a violation of the honesty policy of AUC Whispering talking looking at someone else s paper or copying from any source is considered cheating Any one who does any of these actions or her his answers indicates that she he did any of them will receive a punishment ranging from zero in this exam to failing the course If repeated it may lead to dismissal from AUC I have read the honesty policy and exam instructions and I am presenting this exam as entirely my effort Signature DO NOT USE THIS SECTION Question Points 1 30 2 20 3 20 4 30 Total 100 1 Grade Question 1 30 points Complete and or evaluate the following statements 1 x y x y 2 x y 3 x y x 10 4 The Two s complement of 10000000 2 in 8 bit format is 2 5 The 16 bit Two s complement representation of 0 is 6 1010 10 2 16 7 To address a 512 Mbytes of RAM the address bus should be of bits 8 111111 2 111111 2 2 9 5D0F 16 is a short hand representation of 16 2 10 The 8 bit Two s complement representation of 128 10 is 2 Question 2 20 points Trace the following program Program xyz include iostream using namespace std void main const float c1 1 5 const int c2 3 c3 1 int n m float k n c3 c2 c1 c2 m n n 3 c2 k n m cout The final value of k k endl cout The final value of n n endl cout The final value of m m endl statement 1 statement 2 statement 3 statement 4 statement 5 statement 6 Use the following table to trace the given program i e to plot the value of different variables as instructions are executed one after the other and finally showing the output Statement Number k m n 1 2 3 4 5 6 3 Question 3 20 points Write a program in C to enter four numbers and print out the largest number The Analysis The FlowChart 4 The Program 5 Question 4 30 points The tuition fees of a student is dependent on his her registered credit hours according to the given following rules Write a program in C to read the number of credit hours an integer value from 1 to 24 determine the corresponding tuition fees and print out the value of entered credit hours and the computed tuition fees Show the three phases of software development the analysis design and implementation Credit Hours CH CH 12 12 CH 18 CH 18 Tuition Fees LE 8000 75 9000 50 16000 The Analysis The FlowChart 6 The Program 7


View Full Document

AUC CSCE 106 - Syllabus

Loading Unlocking...
Login

Join to view Syllabus and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Syllabus and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?