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[0][0] + 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[0][0] + 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[0][0] + 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[0][0] + j + k)
> E: *((*(a+j))+k)

> --


A, B & D

--
Andy Knight

void main() detected - core dumped.
--



Tue, 23 Oct 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. NEWBIE in need of help

2. C newbie in need of help

3. Newbie in need of help...

4. Help C newbie need help please

5. Help C newbie need help please

6. HELP -- NEWBIE NEEDS HELP

7. Newbie - fopen help needed

8. Newbie question: Need help please!

9. A newbie needs help with file processing

10. ***Newbie Needs Help With Functions Program ***

11. Newbie needs help

12. need help Newbie with COM

 

 
Powered by phpBB® Forum Software