Explain Passing strings to functions

Explain Passing strings to functions



1.The string to be passed must be declared as a formal argument of the function when it is defined.
     for example : void display(char str[ ])
                            {

                           }
2. The function prototype must show that the argument is a string
     void display(char str[ ]);
3. A call to the function must have a string array name without subscripts as its actual argument.
      display(str);

Labels: