Question: Using C Programming and #include Question 1 David and Peter are twins. Not only do they have the same outlook, they always have the same



Using C Programming and #include
Question 1 David and Peter are twins. Not only do they have the same outlook, they always have the same exact height and weight. If David's height (int h) is 180cm and weight (int w) is 65kg, represent Peter's height and weight using pointers int *hPtr and int *WPtr. Write a C program to input David's height and weight and print the values for h, w, hPtr and WPtr. David's height: 180cm Weight: 65kg Peter's height: 180cm Weight: 65kg Question 2 Complete the C program below to print all values of the number array using an integer pointer int *numberPtr. int main (void) { int number [10] int *numberPtr; {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; // Insert your code here return 0; } Question 3 Modify the function cube () below to accept an integer pointer nPtr as input parameter and return void. int cube (int n) { return n *n* n; } int main (void) { int number 5; number cube (number); printf("%d", number); return 0; } Question 4 Write a function named mystrcat() to concatenate two string pointers char *strl and char *str2 and return char *str. Note: DO NOT USE strcat() from
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
