Question: undefined Purpose: Practice of pointers Instruction: part a. Write a program that: 1. Creates four arrays: an array of 10 ints, an array of 10

undefinedundefined Purpose: Practice of pointers Instruction: part a. Write a program that:

Purpose: Practice of pointers Instruction: part a. Write a program that: 1. Creates four arrays: an array of 10 ints, an array of 10 floats, an array of 10 doubles, and an array of 10 chars 2. Prints the memory addresses of all 10 entries of the arrays. Use the printf conversion for a pointer, "9". 3. What can you deduce from the numbers printed out about how C stores arrays? part b. Describe the behavior of the following program. What is the output from the program after execution? Why? #include int maino int arr[] = { 10, 8, 98, 88, 87, 1, 2, 4, 100, 102, 103, 106 }; int *x = arr+3; int *ptr = &arr[5]; arr[*ptr] ++; printf("First value: %d ", *ptr); printf( "Second value: %d ", *x); *x = 7; printf("Third value: %d ", arr[3] + *ptr); printf("The size of ptr %u ", sizeof(ptr); printf("The size of arr nu ", sizeof(arr)); return(0); } Things to submit: 1. a.c file of the implementation for part a. 2. a file (text or word) contains the explanation for parts a.3 and b

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!