edited by
478 views

1 Answer

0 votes
0 votes

a is a array of integers... a is memory address of a[0] and a+1 is memory address of a[1] and etc...

p is array of pointers... p memory address of p[0] and p+1 is memory address of a[1] and etc...

note that value of p and address of a's are comparable... And it is comparing memories... Means how much distance btw them

ptr is a pointer to pointer. means which can take address of pointer.. Therefore value of ptr and address of p is comparable..

*ptr++ ====> *(ptr++) from associavity and precedence rules..

*++ptr ====> *(++ptr) from associavity and precedence rules..

++*ptr ====> ++(*ptr) from associavity and precedence rules..

according to these basics....

 

Related questions

0 votes
0 votes
1 answer
1
kunal goswami asked Nov 17, 2018
280 views
In two level cache first level cache minimizes cache miss ratio , second level minimizes cache hit ratio . Explain .
0 votes
0 votes
1 answer
2
nag.swarna asked Nov 6, 2018
670 views
3 votes
3 votes
1 answer
3
Mk Utkarsh asked Jan 13, 2018
536 views
0 votes
0 votes
0 answers
4
Gupta731 asked Jan 2, 2019
350 views
$a=a+100$ in function foo, does it increases the value of a by 100 or just increments the address.