Tuesday, December 6, 2011

Write a C Program to fild string length without library function

#include <stdio.h>
#include <string.h>
void main()
{
 int c;
 char a[50];
 printf("Enter A String: ");
 gets(a);
 for(c=0;a[c]!='\0';c++);
 printf("\nYour entertd string is \"%s\" and its Length is \"%d\"",a,c);

}

No comments:

Post a Comment