edited by
936 views
3 votes
3 votes

 

edited by

2 Answers

1 votes
1 votes

arr [6] =     

10 20 30 40 50 60 x y

 1000              1001             1002         1003          1004              1005       1006     1007 . 

char *ptr = (char*) (& arr +1) = skip the array arr[6] and reach to 1006 

now in the next line, they were given,

(ptr−1) its mean that  1006-1 =1005

*(ptr-1) = 60

Related questions

2 votes
2 votes
2 answers
3
3 votes
3 votes
2 answers
4
Shamim Ahmed asked Dec 11, 2018
580 views
char *a = “MADEEASY”;char *b = “GATECSIT2019”;char *r = a;char *s = b;printf(“%d”, (int) strlen (b+3[r] – 1[s]));return 0; Whats the output? Answer given 8