C Language Pointer Question

Asked 2 years ago, Updated 2 years ago, 41 views

int arr[6] = { 1, 2, 3, 4, 5, 6 };
int (*parr)[6] = &arr;

Is parr a pointer variable that points to an array arr of size 6?

c pointer

2022-09-22 11:09

1 Answers

intarr[6] = {1, 2, 3, 4, 5, 6};
int *parr[6] = { arr };

This is right to create an array of pointers that point to arr.


2022-09-22 11:09

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.