Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <math.h>
- double *function(double a[2], double b[2])
- {
- static double result[2];
- result[0] = a[0]-b[0];
- result[1] = a[1]+b[1];
- return result;
- }
- ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- int main()
- {
- double y[2];
- double *x = &y;
- double z[2];
- double *w = &z;
- z[0] = 3;
- z[1] = 2;
- x = function(z,z);
- w = function(x,z);
- printf("\n (%lf ; %lf)",x[0],x[1]);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement