159k views
5 votes
Consider char ** red_flags If we pass &red_flags as a parameter then what is the parameter type?

1 Answer

5 votes

Final answer:

The parameter type for &red_flags would be char***. The & symbol is used to take the address of the variable red_flags.

Step-by-step explanation:

The parameter type for &red_flags would be char***. The parameter type for &red_flags would be char***. The & symbol is used to take the address of the variable red_flags.

The & symbol in &red_flags is used to take the address of the variable red_flags. So, the parameter type would be a pointer to a pointer to a pointer to char.

Here's an example of how you can use the parameter:

  1. void example_function(char*** param) {
  2. char** flags = *param;
  3. // Access elements of flags like flags[i][j]
  4. }
User Katzenversteher
by
8.6k points