Multi Add with malloc

PHOTO EMBED

Sun Sep 05 2021 18:21:30 GMT+0000 (UTC)

Saved by @luisjdominguezp #c #c++

vector* sum( vector* v, int n ) {
    vector* r = ( vector* )( malloc( sizeof( vector ) ) );
    for( i = 0; i < n; i++ ) {
        r = add( r, v + i );
    }
    
    return r;
}
content_copyCOPY