fork(1) download
  1. #include <stdio.h>
  2.  
  3. int f();
  4.  
  5. typedef struct {
  6. int x, y;
  7. } Point;
  8.  
  9. int main()
  10. {
  11. int res = f(&(Point) { .x = 3, .y = 8 },
  12. &(Point) { .x = 3, .y = -1 });
  13. printf("%d\n", res);
  14. return 0;
  15. }
  16.  
  17. int f(Point* lhs, Point* rhs)
  18. {
  19. return lhs->x * rhs->y - lhs->y * rhs->x;
  20. }
Success #stdin #stdout 0s 9432KB
stdin
Standard input is empty
stdout
-27