ics103-major01-061 - King Fahd University of Petroleum and Minerals Information and Computer Science Department ICS 103 Computer Programming in C Fall

ics103-major01-061 - King Fahd University of Petroleum and...

This preview shows page 1 - 4 out of 7 pages.

King Fahd University of Petroleum and Minerals Information and Computer Science Department ICS 103: Computer Programming in C Fall Semester 2006-2007 (Term-061) Major Exam-I Time:100 minutes Wednesday, November 1, 2006 Name: ID#: PLEASE CIRCLE YOUR SECTION BELOW: Section 01 02 03 04 05 Time 9-9:50am 8-8:50am 10-10:50am 11-11:50am 1:10-2pm Note: Copying or Discussion will result in zero grade for all the students involved. Attempt all questions. Question # Maximum Marks Obtained Marks 1 7 x 2 = 14 2 10 3 6 4 10 5 6 6 12 7 6 8 6 9 14 10 16 Total 100 ICS 103 Major Exam-I Term-061 1
Image of page 1
Question 1: (14 points) Assuming that i,j, and k are int and i=3, j=2, k=1 ; find the values of the following expressions expression Value i>j>k i!=j!=k i>j==i+k>j+k K<i!=k<j i-j-k||k==j%i 5+20/i*i+2.5*2 13/3/2+(5-28/3.5) Question 2 (10 points ) Write the corresponding mathematical or C expression C EXPRESSION Mathematical Expression y x 2 y y x 2 2 - - 9-10./(y+b*b*b)+abs(z) b 5 3 a 2 1 + - sqrt(1+2./pow(x+a,2)) ICS 103 Major Exam-I Term-061 2
Image of page 2
Question 3 (6 points) Consider the following c program.
Image of page 3
Image of page 4

You've reached the end of your free preview.

Want to read all 7 pages?

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes