{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

ics103-major01-key-081

# ics103-major01-key-081 - King Fahd University of Petroleum...

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

King Fahd University of Petroleum and Minerals Information and Computer Science Department ICS 103: Computer Programming in C Fall Semester 2008-2009 (Term-081) Major Exam-I Time:100 minutes Wednesday, November 19, 2008 Name: ID#: PLEASE CIRCLE YOUR SECTION BELOW: Section 01 02 03 04 05 06 Time UT-9-10 UT 8-9 UT 10-11 UT 11-12 UT 1:2 SM 9-10 Note: Copying or Discussion will result in zero grade for all the students involved. Attempt all questions. Question # Maximum Marks Obtained Marks 1 14x1.5=21 2 6 3 15 4 10 5 6 6 10 7 10 8 10 9 12 Total 100 1

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

View Full Document
Question 1: ( 21 points-1.5 each expression) Find the values of the following expressions. expression Value 3<=5-2 1 !6<5+2 1 6+6/4.0 7.5 7>3>1 0 6!=2!=1 0 6-4.5/3 4.5 3<=2*2 1 2*6-7*2 -2 1!=2>=0 0 1==3>1 1 2*4.0-2/4 8.0 1&&3==1 0 7-4%3 6 0||4>2 1 Question 2 (6 points ) What will be the values of the variables n,m, and p after executing the following statements. int j,k,n,m,p; j=5; k=2; n=j- ++k; m=j-- + k--; p=k+j; n m p 2 2 8 6 8
Question 3 (15 points ) Find the output of the following programs.

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 7

ics103-major01-key-081 - King Fahd University of Petroleum...

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

View Full Document
Ask a homework question - tutors are online