NEWBIE in need of help
Author Message NEWBIE in need of help

Indicate whether or not each of these expressions is equivalent to a[j][k]
A: *(a[j] + k)
B: (*(a+j))[k]
C: (*(a+k))[j]
D: *(&a + j + k)
E: *((*(a+j))+k)

--

Mon, 22 Oct 2001 03:00:00 GMT  NEWBIE in need of help

Quote:

> Indicate whether or not each of these expressions is equivalent to a[j][k]
> A: *(a[j] + k)
> B: (*(a+j))[k]
> C: (*(a+k))[j]
> D: *(&a + j + k)
> E: *((*(a+j))+k)

Why don't you just send us your instructors email address, so you don't have to
post these one at a time?

Once you know that E1[E2] means the same thing as (*(E1+(E2))), you can
immediately do your homework for yourself.

--

--

Tue, 23 Oct 2001 03:00:00 GMT  NEWBIE in need of help

Quote:

>Indicate whether or not each of these expressions is equivalent to a[j][k]
>A: *(a[j] + k)
>B: (*(a+j))[k]
>C: (*(a+k))[j]
>D: *(&a + j + k)
>E: *((*(a+j))+k)

>--

If the variable a is defined as
TYPE **a;
then I think option E is correct.

--

Tue, 23 Oct 2001 03:00:00 GMT  NEWBIE in need of help

Quote:

> Indicate whether or not each of these expressions is equivalent to a[j][k]
> A: *(a[j] + k)
> B: (*(a+j))[k]
> C: (*(a+k))[j]
> D: *(&a + j + k)
> E: *((*(a+j))+k)

> --

A, B & D

--
Andy Knight

void main() detected - core dumped.
--

Tue, 23 Oct 2001 03:00:00 GMT

 Page 1 of 1 [ 4 post ]

Relevant Pages