Computer Science, asked by padmajapadma559, 2 months ago

Discuss a pointer to array structure with syntax and example

Answers

Answered by deepalsable44
0

Answer:

Pointer to Array

Use a pointer to an array, and then use that pointer to access the array elements. For example, #include<stdio.h> void main() { int a[3] = {1, 2, 3}; int *p = a; for (int i = 0; i < 3; i++) { printf("%d", *p); p++; } return 0; }

Answered by PiyushSinghRajput1
1

Explanation:

Pointer to Array

Use a pointer to an array, and then use that pointer to access the array elements. For example, #include<stdio.h> void main() { int a[3] = {1, 2, 3}; int *p = a; for (int i = 0; i < 3; i++) { printf("%d", *p); p++; } return 0; }

Similar questions
Art, 2 months ago