Algorithm
- Pointer
- Array
Code Examples
#1 Code Example with C Programming
Code -
C Programming
#include <stdio.h>
int main() {
int arr[5] = {10, 20, 30, 40, 50};
int *ptr = arr;
for (int ii = 1; ii < = 5; ++ii)
{
printf("%d No. Element of the array is : %d\n", ii, *ptr);
++ptr;
}
return 0;
}
Copy The Code &
Try With Live Editor
Output
1 No. Element of the array is : 10
2 No. Element of the array is : 20
3 No. Element of the array is : 30
4 No. Element of the array is : 40
5 No. Element of the array is : 50
2 No. Element of the array is : 20
3 No. Element of the array is : 30
4 No. Element of the array is : 40
5 No. Element of the array is : 50