Horje
How to change an array in a function in c Code Example
How to change an array in a function in c
// Change the pointer of the array
void change(int **array, int length)
{
    *array = malloc(length * sizeof(int));
    if (*array == NULL)
        return;
    for (int i = 0 ; i < length ; i++)
        (*array)[i] = 1;
}




C

Related
Stack Push Code Example Stack Push Code Example
how to login to another user in powershell Code Example how to login to another user in powershell Code Example
how to replace a number in an array in the console for c programming Code Example how to replace a number in an array in the console for c programming Code Example
c bit access union Code Example c bit access union Code Example
shuffle function in c Code Example shuffle function in c Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
10