Consider the following programmain(){int a[5]={1,3,6,7,0};int *b;b=&a[2];}The value of b[-1] isA. 1B. 3C. -6D. none

This question is related to TCS Interview

Showing Answers 1 - 1 of 1 Answers

chandan maity

  • Mar 20th, 2006
 

ans B.3because pointer of array b contains the address of a[2] element,i mean b[0] shuld be 6 so b[-1] is the value of before 6 means 3.

  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.