Given the piece of codeint a[50];int *pa;pa=a;To access the 6th element of the array which of the following is incorrect?A. *(a+5)B. a[5]C. pa[5]D. *(*pa + 5}

This question is related to TCS Interview

Showing Answers 1 - 4 of 4 Answers

Karthik Raj

  • Aug 17th, 2006
 

D is the wrong way of accessing 6th element

  Was this answer useful?  Yes

Nishi Rathore

  • Sep 25th, 2007
 

the ans is C because pa is a pointer and we can not access value through pointer like
pa[5].

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions