here you find the best simplest implement of programs

code_world

love programing and watch my all easy implement of program hope you like it

Tuesday, 2 May 2017

Find the length of a string

                length of a string  


#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
 char str[10],length,i=0;
 clrscr();
 printf("\nenter the string");
 gets(str);
 while(str[i]!='\0')
  i++;
  length = i;
  printf("\n the lenght of string %d",length);
  getch();
 }
Share:

Related Posts:

0 comments:

Post a Comment