Search:

Type: Posts; User: nimitzhunter

Search: Search took 0.01 seconds.

  1. Replies
    6
    Views
    1,317

    to use malloc with dynamic array, you still need...

    to use malloc with dynamic array, you still need the size of the array.


    int *array = malloc( 8 * sizeof(int)); <-- allocated space for 8 intergers.
    free(array); // call free after done with...
  2. Replies
    6
    Views
    1,317

    you meant like this? int num [] = {76, 13,...

    you meant like this?


    int num [] = {76, 13, 14, 1, 55, 33, 24, 65}


    you don't need the size of the array when you initialize it. however, you'd need it later when you want to operate on the...
Results 1 to 2 of 2