#include<stdio.h>
#include<iostream.h>
#include<conio.h>
void count(char a[]);
void main()
{
clrscr();
char a[10],i;
cout<<"\n";
cout<<"enter a string";
cout<<"\n";
gets(a);
count(a);
getch();
}
void count(char a[])
{
int countt=0,i;
for(i=0;a[i]!='\0';i++)
{
countt++;
}
cout<<"\n";
cout<<"the length of string is"<<"\t"<<countt;
}
#include<iostream.h>
#include<conio.h>
void count(char a[]);
void main()
{
clrscr();
char a[10],i;
cout<<"\n";
cout<<"enter a string";
cout<<"\n";
gets(a);
count(a);
getch();
}
void count(char a[])
{
int countt=0,i;
for(i=0;a[i]!='\0';i++)
{
countt++;
}
cout<<"\n";
cout<<"the length of string is"<<"\t"<<countt;
}