closed by
147 views
0 votes
0 votes
#include <stdio.h>
int main(void)
{
char a[5] = { 1, 2, 3, 4, 5 };
char *ptr = (char*)(&a + 1);
printf("%d %d\n", *(a + 1), *(ptr - 1));
return 0;
}

what is o/p of this program?

how does a and &a denote different things in an array? please explain

closed by

Related questions

6 votes
6 votes
0 answers
1
V pandey asked Oct 8, 2022
3,048 views
Consider a multi-dimensional array A [90][30]40] with base address start at 1000, calculate the address of A[10][20][3] in row major order and column major order. Assume ...
3 votes
3 votes
3 answers
3
vishwa ratna asked Dec 12, 2016
2,629 views
I am not getting the answer , (11*8*13+67)*4+ base address =400+4844= 5244.But the answer is 5336, please explain.similar question is here: https://gateoverflow.in/29361/...
16 votes
16 votes
3 answers
4
shikharV asked Dec 4, 2015
15,593 views
A is an array $[2.....6, 2.....8, 2.......10]$ of elements. The starting location is $500$. The location of an element $A(5, 5, 5)$ using column major order is __________...