2nbspwrite a c program using a pointer for keying six


1. Consider the following syntax of a program.

int i, j = 26;

int *pi, *pj = &j;

*pj = j + 5;

i = *pj + 5;

pi = pj;

*pi = i + j;

Solve the problem by finding and explaining the following:

(1) &i

(2) &j

(3) pi

(4) pj

(5) *pi

(6) *pj

(7) i

(8) pi

(9) *(pi-1)

(10) (*pi+2)

(11) (pi+2)

 

2. Write a C program using a pointer for keying six integers by the user. The six values are stored in an array using a pointer. Then print the elements of the array on the screen.

3. Modify the solution of exercise 2 using a pointer to make the C program to print the elements of the array in reverse order.

4. Write a C program to sort an array of 12 integers in descending order.

5. Write a C program to sort an array of 15 integers in an ascending order.

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: 2nbspwrite a c program using a pointer for keying six
Reference No:- TGS01155634

Expected delivery within 24 Hours