Thursday, July 22, 2010

Program to count length of given string ( GTU Sem I Program No : 23)

/*Program to find length of inputted string
  Program No   : 23 of GTU Practice Programs
  Developed by : Malhar Vora
  Developed on : 20/07/2010
  Email        : vbmade2000@gmail.com
  Web Site     : http://malhar2010.blogspot.com
****************************************************************************/


#include 

int strlen(char *str)
{
    int count=0;
    while(str[count]!=0)
      count++;
    return count;
}

void main()
{
   char *str;
   printf("Enter a string :");
   gets(str);
   printf("\nLength of string is : %d",strlen(str));
} 


3 comments:

  1. Hello Sir,

    Your website is very helpful to me, Thank you.

    I found one very good websites for C, C++, VB and Java Programs.

    ReplyDelete
  2. Thanx Rupal for your comment. Please suggest my blog to your friends. I will regularly post useful contents on my blog.

    ReplyDelete
  3. I am fan of Programming and I do lot of programming my self but now when I need program, I first search your website.

    Why dont you put your link on www.gtuinfo.in? Please do so.

    ReplyDelete

Note: Only a member of this blog may post a comment.