How do you pass an array as a parameter?

To pass an array as a parameter to a function, pass it as a pointer (since it is a pointer). For example, the following procedure sets the first n cells of array A to 0. Now to use that procedure: int B[100]; zero(B, 100);

Sizin İçin Seçtik  How do you pass an array as a parameter?

Leave a Reply

Your email address will not be published. Required fields are marked *

How do you pass an array as a parameter?

To pass an array as a parameter to a function, pass it as a pointer (since it is a pointer). For example, the following procedure sets the first n cells of array A to 0. Now to use that procedure: int B[100]; zero(B, 100);

Sizin İçin Seçtik  Can I download Ledger Live on a Chromebook?

Leave a Reply

Your email address will not be published. Required fields are marked *