edited by
1,019 views
4 votes
4 votes

edited by

1 Answer

Best answer
2 votes
2 votes

The variable 'ptr' holds the address of the 4th element of the array here.Then 'ptr1' is also assigned the same address and 'ptr2' holds the base address of the array.

It is to be noted that the value of ptr and ptr2 gets dereferenced first then incremented within printf() statement.

So ASCII value of newline character  =  10 (in decimal)

and ASCII value of 'A'  = 65

So the result of the expression will be  : 10 + 1 + 65 + 1 - 10

                                                    =     67

selected by

Related questions

0 votes
0 votes
2 answers
1
Somdatta Sen asked Feb 10, 2019
425 views
For this statement->printf ("%s",* *++cpp+3);What will be the order of precedence according to pointer arithmetic?
3 votes
3 votes
0 answers
3
nishitshah asked Jan 26, 2018
651 views
Answer given is option C. How ?I gather that the character pointer will point to the first byte of the integer whose value is 255.But after that what should be the soluti...
0 votes
0 votes
0 answers
4