287 views
1 votes
1 votes
Let's consider 2 cases

Case1 : int A[2][3];

Case 2 : int (*A)[2][3];

Is there any difference between A in Case1 and Case2?if any please explain?

2 Answers

0 votes
0 votes
In case 1: A is an 2D array of size 2×3 of integer types.

Whereas in case 2: A is an pointer array of size 2×3 to integer value .i.e. A array holds the address of integer.

Related questions

0 votes
0 votes
1 answer
1
Debargha Mitra Roy asked 2 days ago
44 views
#include <stdio.h int main() { int a[3] = {1, 3, 5, 7, 9, 11}; int *ptr = a[0]; ptr += sizeof(int); printf("%d", *ptr); return 0; }(Assume size of int to be $2$ bytes.)T...
2 votes
2 votes
1 answer
2
1 votes
1 votes
1 answer
3
Sparsh-NJ asked Jul 15, 2023
377 views
Can an array store elements of different storage classes?