EME5 Homework 04 Solutions
October 30, 2014
4
Chapter 5, Problem 13
sum = 4
5
Chapter 5, Problem 14
5.1
Part C
5.1.1
Solution Code
#include <stdio.h>
#include <math.h>
int main() cfw_
double x, x0, xf, xstep, result;
int i, n;
printf("
x
f3(x)\n");
printf
EME5 Homework 09 Solutions
December 4, 2014
2
Chapter 13, Exercise 19
The value returned is 13. The cast operation is not necessary.
3
3.1
Chapter 13, Problem 21
Solution Code
/*
* File: student.h
* This header file contains macros, data structures and
*
EME5 Homework 07 Solutions
November 20, 2014
3
3.1
Chapter 11, Exercise 1
Part E
A void * pointer cannot be dereferenced.
3.2
Part F
xPtr is not declared as a pointer so it should be dereferenced as well.
4
4.1
Chapter 11, Exercise 3
Part A
long long *llp
EME5 Homework 06 Solutions
November 13, 2014
3
Chapter 10, Problem 22
3.1
Part a.1
3.1.1
Solution Code
#include <stdio.h>
#define N 6
int main() cfw_
int a[N] = cfw_1, 4, 6, 4, 9, 5;
int i, j, temp;
int total=0;
double mean, median;
printf("The original d
EME5 Homework 01 Solutions
October 9, 2014
6
Chapter 1, Exercise 1
CPU (including ALU, CU, registers), main memory, external memory, and input and output devices.
7
Chapter 1, Exercise 2
perform arithmetic and logic operations on data in registers.
8
Chap
EME5 Homework 03 Solutions
October 23, 2014
3
3.1
Chapter 4, Exercise 1
Part a
False. Some operators are operated from left to right and others are evaluated from right to left depending
on their associativity.
4
4.1
Chapter 4, Exercise 2
Part f
(a = b) &
EME5 Homework 02 Solutions
October 16, 2014
3
3.1
Chapter 3, Exercise 1
Part a
063, 51, 0x33
3.2
Part d
075, 61, 0x3d
3.3
Part f
0377, -1, 0xFF
4
4.1
Chapter 3, Exercise 2
Part a
0b0000 0000 0000 0000 0000 0000 0000 0001
4.2
Part b
0b1111 1111 1111 1111 1