Logo 
Search:

C Programming Articles

Submit Article
Home » Articles » C Programming » Homework HelpRSS Feeds

Program of passing character array to function

Posted By: Sarah Campbell     Category: C Programming     Views: 7825

Program of passing character array to function.

Code for Program of passing character array to function in C Programming

main ( )
{
    char s1[6] = “abcde ”;
    int cnt = 0;
    cnt = cnt_str(s1);    \\ A
            printf( “ total characters are %d \n”, cnt);
}
int cnt_str(char s1[]);    \\ B
{
    int cn = 0;
            while ( (cn < 6) && s1[cn]! = ‘\0’)
    cn++;
    return(cn);
}
  
Share: 


Didn't find what you were looking for? Find more on Program of passing character array to function Or get search suggestion and latest updates.

Sarah Campbell
Sarah Campbell author of Program of passing character array to function is from Toronto, Canada.
 
View All Articles

Related Articles and Code:


 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!