ics103-major01-071-key

# ics103-major01-071-key - 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 2007-2008 (Term-071) Major Exam-I Time:100 minutes Saturday, October 27, 2007 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 12x1.5=18 2 6 3 6 4 8 5 10 6 10 7 10 8 12 9 20 Total 100 1

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

View Full Document
Question 1: (1 8 points-1.5 each expression) Find the values of the following expressions. expression Value 7/2*2.0 6.0 5%7 5 5+3/2.0 6.5 11-3/2 10 13-5/2.0 10.5 5<3<=2-5 0 5!=4!=1 0 5>2>0 1 (double)(5/2) 2.0 (int)(7/2.0) 3 5!=1<0 1 10/4/2.0 1.0 Question 2 (6 points ) Find the equivalent expression by removing the brackets expression Equivalent expression without brackets 6 > x || x>= 50 !((a && b) || Or a != b || c == d 2
Question 3 (6 points ) What will be the values of x, y, and z after executing the following statements. int x=5.623;

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.

## This note was uploaded on 05/09/2010 for the course ICS 103 taught by Professor Baleh during the Spring '10 term at Abilene Christian University.

### Page1 / 7

ics103-major01-071-key - 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