## PIC 10B

(Sec. 1a-1b)

C++ Programming and Problem Solving

## Instructor: Ivo Dinov, Asst. Prof.

 http://www.math.ucla.edu/~dinov/10b.1.001

Due Date:

# Monday, 8:00 PM, July 02, 2001

Please, submit your homework electronically using the "submit" system. Your solutions should be in ASCII (text) files called HW_1_1.txt, HW_1_2.txt and contain the solutions to each of the 2 problems separately.

• (HW_1_1.txt) Explain the difference between
• char charArray1[] = "Value of charArray1";
• char charArray2[16] = {'V', 'a', 'l', 'u', 'e', ' ', 'o', 'f', ' ', 'c', 'h', 'a', 'r', 'A', 'r', 'r', 'a', 'y', '2'};

• (HW_1_2.txt) In a multi-dimensional array:
• int zDim=1010, yDim=2020, xDim=505;
• int myIntArray[zDim][yDim][xDim];
order the index dimensions fast-to-slow. Which one is the fastest-varying and which one is the slowest-varying index? What is the total memory space occupied by this array?

\Ivo D. Dinov, Ph.D., Department of Neurology and Program in Computing, UCLA School of Medicine/