Syntax for arrays as operands

What is the syntax in order to pass an array that is not predefined in a function as operand?

For example i have this function:

void kilos(int percentage[2],char liquid[2][4]);

So if i make 2 different arrays(declare and define) and pass them as operands everything work properly.

How can this work if i do not want to make the arrays before the call of the function?
If i have the variables i want to pass and i do not have a and also do not want to make the arrays before i call the function.How can i do it all at once?

Is the only solution to analyze the operands and not use arrays?

How can this work if i do not want to make the arrays before the call of the function?

It can't. If the function expects an argument, you must pass it one. That means you need to have one to pass it.

this is want i guess. :frowning: so there is no way that i could declare(this can happen) and initialize the arrays as i call the function inside the parenthesis.Something like:

kilos(int percent[2]={40,60},char liq[2][4]={'wate','milk'})

so there is no way that i could declare(this can happen) and initialize the arrays as i call the function inside the parenthesis.

No.

I'm not 100% sure what you're asking but you can write overriding functions with the same name that expect different parameters.

void setup() {
  func(1,2);
  func();
}

void loop() {
}

void func(int a, int b) {
 // do stuff with a & b
}

void func() {
   // nothing
}

kyrpav:
this is want i guess. :frowning: so there is no way that i could declare(this can happen) and initialize the arrays as i call the function inside the parenthesis.Something like:

No, but you could define a local or global const array containing the values and use that as the argument.