Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Complete each problem below as directed using valid C syntax: R. Declare a funct

ID: 3835453 • Letter: C

Question

Complete each problem below as directed using valid C syntax:

R. Declare a function named average that takes an integer array and the size of the array as an argument. The return value is a double. S. If variable p is a pointer and points to the base address of an integer array, use variable P to set the value at index 5 of the array to the value 5. T Name a function in the C standard libraries e. in stdio.h) that uses pass by reference. U. Show the LC-3 assembly code for pushing the value in R5 onto the runtime stack. V. Declare a struct that holds an integer array of length 10 and a character array of length W. Declare a struct suitable for representing a linked list. X. Write an expression for an int value with an alternating bit pattern (e.g. 0101b) that fills up all 32 bits of the integer Hint: come up with an appropriate literal Y Write an expression that evaluates to true. You may not declare or use any variables.

Explanation / Answer

Hi, I have answered 6 parts. Please repost others.


R)
  
   double average(int arr[], int size);

S)
   *(p+4) = 5; // setting value of arr[4] to 5

T)
   scanf() function

V)
   struct int_arr{
       int arr[10];
       char cArr[10];
   };

W)
   struct node{
       int data;
       struct node *next;
   };

X)
   4 > 3 : evaluates to true

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote