ics103-major01-072

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

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 Spring Semester 2007-2008 (Term-072) Major Exam-I Time:100 minutes Saturday, March 22, 2008 Name: ID#: PLEASE CIRCLE YOUR SECTION BELOW: Section 01 02 03 04 05 06 Time SM-8-9 SM 9-10 SM 11-12 UT 10-11 UT 11:12 UT 10-11 Note: Copying or Discussion will result in zero grade for all the students involved. Attempt all questions. Question # Maximum Marks Obtained Marks 1 16x1.5=24 2 6 3 6 4 6 5 10 6 8 7 6 8 16 9 18 Total 100

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

View Full Document
Question 1: ( 24 points 1.5 each expression) Find the values of the following expressions. expression Value 5>6-2 1!=1<=1 10<=7<=5 7<10<=10-5 6!=3!=1 -8<-4<0 (double)(9/2) 3*4-6/2.0 -4+4*3%5 3%5*5 21/6*6.0 11+1/2.0 10/(int)2.5 3-2||1==2%3 2
Question 2 (6 points ) What is the output of the following program #include <stdio.h> int main(void) { int x,y,z; x=20;z=30; if(0<=x<=10) printf("in\n"); else printf("out\n"); if( x=10)

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-072 - King Fahd University of Petroleum and...

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

View Full Document
Ask a homework question - tutors are online