Assume that unsigned integers are stored in 2 bytes and that the starting addres
ID: 3690537 • Letter: A
Question
Assume that unsigned integers are stored in 2 bytes and that the starting address of the array is at location 1002500 in memory. a) Declare an array of type unsigned int called values with 5 elements, and initialize the elements to the even integers from 2 to 10. Assume the symbolic constant SIZE has been defined to 5. b) Declare a pointer vPtr that points to an object of type unsigned int. c) Print the elements of array values using array subscript notation. Use a for structure, and assume integer control variable i has been declared. d) Give two separate statements that assign the starting address of array values to pointer variable vPtr. e) Print the elements of array values by subscripting the pointer to the array. f) What address is referenced by vPtr + 3? What value is stored at that location?g) Assuming vPtr points to value[4]. What address is referenced by vPtr -= 4. What value is stored at this location? 5) For each of the following, write a single statement that performs the indicated task. Assume that long integer variables valuel and value2 have been declared and that value 1 has been initialized to 200000. a) Declare the variable lPtr to be a pointer to an object of type long. b) Assign the address of variable valuel to pointer variable lPtr. c) Print the value of the object pointed to by lPtr.d) Assign the value of the object pointed to by lPtr to variable value2. e) Print the value of value2. f) Print the address of valuel. g) Print the address stored in lPtr. Is the value printed the same as the address of valuel? 6) Do each of the following: a) Write the function header for function zero which takes a long integer array parameter biglntegers and does not return a value. b) Write the function prototype for the function in part (a). c) Write the function header for function addl And Sum which takes an integer array parameter one Too Small and returns an integer. d) Write the function prototype for the function described in part (c). 7) Modify the following program to instead convert uppercase letters to lowercase letters using a non-constant pointer to non-constant data, (use standard C functions isupper and tolower from include file ctype.h)/* Converting lowercase letters to uppercase letters using a non-constant pointer to non-constant data */#include #includeExplanation / Answer
Here is your requirement served.
Write the function header for function zero which takes a long integer array parameter bigIntegers and does not return a value.
/*Takes an long integer array as input, and will return nothing.*/
void zero(long int bitIntegers[])
Write the function prototype for the function.
void zero(long int []);
Write the function header for function add1AndSum which takes an integer array parameter oneTooSmall and returns an integer.
int add1AndSum(int oneTooSmall[])
Write the function prototype for the function.
int add1AndSum(int []);