How to Write a C Program to find string length without library function in C Programming Language ?
Solution:
- #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);
- }