C the code is as below function hd fdatoolhw1filter

Info iconThis preview shows page 1. Sign up to view the full content.

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

Unformatted text preview: A[4] =  ­4.) printf("b: %d\n", *b); (Print out “b: 10”) printA(A); (Call function printA(), print out “ A={0,2,4, ­2, ­4,10}”) b=&A[1]; /* Z */ ( Let pointer b to point at A[1]) *b=A[2]; (Assign A[2] to A[1]) printf("b: %p\n", b); (print out the address of A[1], which is machine dependent.) printA(A); (Call function printA(), print out “ A={0,4,4, ­2, ­4,10}”) The final lines to be printed out is as below: a: 0 b: 4 b: 6 b:  ­1 A={0,2,4, ­1,8,10} b: 8 A={0,2,4, ­2,8,10} b: 10 A={0,2,4, ­2, ­4,10} b: 0x7fff45b18db4 A={0,4,4, ­2, ­4,10} 5. Answer: The matlab plot is shown as below: a. 145 b. From the matlab plot...
View Full Document

Ask a homework question - tutors are online