Thursday, 2 October 2014

WAP to print length of String.


#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
char s[100];
char *a=s;
int x=0;
printf("\nEnter the String ");
gets(s);
while(*a)
{      a++;
       x++;

}
printf("\n\tLength of String is : %d",x);
getch();

}

No comments:

Post a Comment

Please write your doubts