Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

ansi c function array of strings parameter

void sort(char **, int);
int main()
{
    char *string_database[5]={''};
    string_database[0]="Florida";
    string_database[1]="Oregon";
    string_database[2]="California";
    string_database[3]="Georgia";

    sort(string_database, 4);
    return 0;
}

void sort(char **str, int n)
{
    int i = 0;
    for (i = 0; i < n; i++)
      printf("The string is= %s
",str[i]);

}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #ansi #function #array #strings #parameter
ADD COMMENT
Topic
Name
7+4 =