conceptual problem about ARRAY

Discussion in 'C' started by singh_r85, May 28, 2010.

  1. singh_r85

    singh_r85 New Member

    Joined:
    May 25, 2010
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    0
    What happens when if will write the value in array subscript operator which is beyond the size of array?
     
  2. spoddar66

    spoddar66 New Member

    Joined:
    May 25, 2010
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    0
    may be: It will return zero or null value or give an error message.I am not sure.
     
  3. singh_r85

    singh_r85 New Member

    Joined:
    May 25, 2010
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    0
    No. This is a wrong answer.It will return a garbage value but i dont know why.
     
  4. pkbis28

    pkbis28 New Member

    Joined:
    May 25, 2010
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    0
    If we will go the beyond array it will point next continuous memory address. Thus it will return a garbage value.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice