hw8_solution

hw8_solution - EME5 Homework 8 Solutions November 19, 2010...

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

View Full Document Right Arrow Icon
EME5 Homework 8 Solutions November 19, 2010 3 Chapter 11, Problem 9 Determines the length of a string. 4 Chapter 11, Problem 10 4.1 Solution Code typedef int *(*FUNPTR)(double x, double y); FUNPTR fptr; int *function(double x, double y) { int *retval; /* retval points to a global variable or dynamically allocated memory */ return retval; } 5 Chapter 11, Problem 12 i = 20 p2 = 20 6 Chapter 11, Problem 15 6.1 Part f 7 6.2 Part g 3 1
Background image of page 1

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

View Full DocumentRight Arrow Icon
6.3 Part h 7 6.4 Part i 4 6.5 Part j 8 7 Chapter 11, Problem 18 7.1 Solution Code #include <stdio.h> #define YEAR 2 #define MONTH 12 const char *month[12] = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}; int main() { double a[][MONTH] = {367, 654, 545, 556, 565, 526, 437, 389, 689, 554, 526, 625, 429, 644, 586, 626, 652, 546, 449, 689, 597, 679, 696, 568}; int i, j; double monthtotal, meanval; printf("%-12s%-12s\n", "Month", "Sale (x1,000 $)"); printf("---------------------------\n");
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/23/2011 for the course EME 5 taught by Professor Staff during the Fall '08 term at UC Davis.

Page1 / 6

hw8_solution - EME5 Homework 8 Solutions November 19, 2010...

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