how to increase the size of an array during prog execution

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dawood khan
    New Member
    • Apr 2013
    • 1

    how to increase the size of an array during prog execution

    how we will increase the size of an arry during program execution. eg if the size of an array is 40 and during prog exexution we want to increase the size of an arry ,what is the procedure.
  • johny10151981
    Top Contributor
    • Jan 2010
    • 1059

    #2
    1: your array must have to be in heap not on stack
    2: use realloc function to increase the size

    Comment

    Working...