code: public static double[] add(double[] a, double c) {
      double[] result = new double[a.length];
      for (int i = 0; i < a.length; i++) {
        result[i] = a[i] + c;
      }
      return result;
    }
docs: OPERATIONS WITH SCALAR - NONDESTRUCTIVE