HW_08

HW_08 - CS/ECEn 124, W2012 Homework #8 The C Language (Ch...

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

View Full Document Right Arrow Icon
Homework #8 The C Language (Ch 11) Types, Operators, Expressions (Ch 12) Name Section Score / 41 Questions: Answers: 1. (6 points) For the following descriptions, give at least two differentiating items: a) Describe the input to the C preprocessor. b) Describe the input to the C compiler. c) Describe the input to the linker. 2. (11 pts) If a=6 and b=9 for each of the given expressions, what are the values of a and b and the result of the expression after each statement is executed? Expression a b Result a | b a || b a % b a %= b a = b a = b = 5 a <<= b a == b 3. (4 points) If i=2 and j=8 for each of the given statements, what are the values of i and j after each statement is executed? 4. (4 points) Suppose a program contains the two variables x and y . a) First, write a program segment to exchange x and y using a temporary variable for storage. b) Rewrite this program segment to exchange x and y WITHOUT using a temporary variable. BYU, ECEn/CS 124, W2012
Background image of page 1

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

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

This document was uploaded on 03/20/2012.

Page1 / 2

HW_08 - CS/ECEn 124, W2012 Homework #8 The C Language (Ch...

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

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