/*WAP TO CALCULATE THE LENGTH OF A STRING*/
#include
#include
void main()
{
char arr[]="Ashoka";
int len1;
clrscr();
len1=strlen(arr);
printf("STRING:%s\n\n\n\nLENGTH=%d",arr,len1);
getch();
return;
}
/******OUTPUT******
STRING:Ashoka
LENGTH=6
*/
No comments:
Post a Comment