Sunday, 21 October 2012

Finding the length of a string

By The Programming Trailblazers   Posted at   Sunday, October 21, 2012   No comments

Program to find the length of a given string.
__________________________________

#include<iostream.h>
#include<conio.h>
#include<stdio.h>
void main()
{ 
   clrscr();
   int i , char text[80];
   cout<<"\nEnter the string(max=80) :";
   gets(text);
   for( i=0 ; text[i]!='0' ; i++ )
   cout<<"\nThe length of the string is: " <<i ;
   getch();
}
   

About the Author

Nulla sagittis convallis arcu. Sed sed nunc. Curabitur consequat. Quisque metus enim, venenatis fermentum, mollis in, porta et, nibh. Duis vulputate elit in elit. Mauris dictum libero id justo.
View all posts by: BT9

0 comments :

Back to top ↑
Connect with Us

    Total Pageviews

    Powered by Blogger.

    Followers

    Blogroll

What they says

© 2013 The Programming Trailblazers . WP Mythemeshop Converted by Bloggertheme9
Blogger templates . Proudly Powered by Blogger .