Using C programming
using the correct syntax define and declare an array of 10integers, initialize it from 1 to 10 in ascending order, thendefine and declare a pointer and set it to the location of the lastelement.
Only write the syntax (code snippet) needed to perform thedirections above. You dont need to compose a program.
Solution
Answer:
int a[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; // Declaration ofarray elements from 1 to 10 in ascending order
int *p = &a[9]; // Declaring a pointer and setting it to thelocation of last element of the array, this statement assigns theinteger
OR
OR