| |
Answer/Explaination
:
ck
(Exp):
In this problem we have an array of char pointers pointing to start of
4
strings. Then we have ptr which is a pointer to a pointer of type char
and a
variable p which is a pointer to a pointer to a pointer of type char.
p hold
the initial value of ptr, i.e. p = s+3. The next statement increment
value in
p by 1 , thus now value of p = s+2. In the printf statement the
expression
is evaluated *++p causes gets value s+1 then the pre decrement is
executed
and we get s+1 – 1 = s . the indirection operator now gets the value
from
the array of s and adds 3 to the starting address. The string is
printed
starting from this position. Thus, the output is 'ck'.
|
|