Question: 1. In C, how do you specify a variable as global vs local? What does global mean? What does local mean? 2. Consider a function

1. In C, how do you specify a variable as global vs local? What does global mean? What does local mean? 2. Consider a function in C, explain the difference between prototype (declaration) and definition? 3. What is the difference between long and int32_t? What is the difference between int16_t and uint16_t? 4. In what way are function parameters similar to local variables? 5. Design a C function that takes a signed 32-bit input and returns a signed 32-bit result. If the input is less than 100, add one, and return the result. If the input is greater than or equal to 100, return -100. Show the prototype and definition. 6. If an array has 20 elements, what are the valid indices into the array? 7. Assume the base address of an array is BASE. Assume there are 10 elements, and each element is a signed 16-bit value. What is the address of the element at index 1? 8. Design a C function that finds the minimum value of an array. A pointer to the array and the size of the array are input parameters. Assume the size is not zero. The function prototype is int16_t min(int16_t data[], uint32_t size)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
