CSE 123c notes

CSE 123c notes - CSE 123C February 18, 2008 In addition to...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CSE 123C February 18, 2008 In addition to the power point on HuskyCT Answers to quiz from Friday: 1. 7.8005 x 10 1 and -4.06 x 10-4 2. y=sqrt(x); 3. x=(x+1)*y 4. x=x+(y-10) Practice! Write the non abbreviated form 1. x+= y=z*=2; 2. !(a=3*b); 3. x=x/++x; Answers: 1. x+=(y=(z*=2)); x=x+(y=(z=z*2)); z=z*2; y=z; x=x+y; 2. !(a==3*b); 3. x=x/(++x); If statement starts with if (expression) and ends with } int x =1, k=5; if (x>0) k++ k--; for this example, x>0, so you increment k, k=6, then you decrement k, k=5 int x=-1, k=5; if (x>0) k++ k--; for this example, x is not greater than 0, so you skip whats indented and go straight to the k--, decrement k, k=4 Short circuiting-evaluating as much of the expression as needed to get result, example- or statements (if the first expression is true, you know the whole expression is true)...
View Full Document

This note was uploaded on 04/08/2008 for the course CSE 123c taught by Professor Elkarboutly during the Spring '08 term at UConn.

Page1 / 4

CSE 123c notes - CSE 123C February 18, 2008 In addition to...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online