homework10 - 8.8 a. False, Subtracting or comparing two...

Info iconThis preview shows pages 1–4. 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

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: 8.8 a. False, Subtracting or comparing two pointers that do not refer to elements of the same array is a logic error. b. False, Although array names are pointers to the beginning of the array and pointers can be modified in arithmetic expressions, array names cannot be modified in arithmetic expressions, because array names are constant pointers. 8.9 a. unsigned int values[SIZE] = {2,4,6,8,10}; b. unsigned int *vPtr; c. for (int I = 0; I < SIZE; i++) { cout << values[i] << endl; } d. unsigned int values[SIZE] = {2,4,6,8,10}; unsigned int vPtr = &values[0]; e. for (int I = 0; I < SIZE; i++, vPtr++) { cout << \t << *vPtr; } f. for (int I = 0; I < SIZE; i++) { cout << \t<< *(values + i); } g. for (int I = 0; I < SIZE; i++) { cout << \t<< vPtr[i]; } h. unsigned int *vPtr = values; cout << values[4]; cout << *(values + 4); cout << *(vPtr + 4); i. 1002506; 8 j. 1002500; 2 8.10 a. long *longPtr; b. longPtr = &value1; c. cout << *longPtr; d. value2 = *longPtr; 8.11 a. void zero(long bigIntegers) b. void zero(long); c. int add1AndSum(int oneTooSmall) d int add1AndSum(int ); Header File: // *********************************************************************** // File: maze.h // // Traverse maze - Program find its way out of a maze // // Author: Benjamin Jones // Created: 10 March 2008 // Updated: Original // // Assignment: 8.25 // Compiler: MinGW32 G++ 3.4.2 (GNU) // // Inputs: Maze file...
View Full Document

This homework help was uploaded on 04/18/2008 for the course ECEE 120 taught by Professor Carter during the Winter '08 term at University of Cincinnati.

Page1 / 12

homework10 - 8.8 a. False, Subtracting or comparing two...

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

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