Write a C program which takes a string as input and displays its length. (Do not use built-in strlen function).
1 Answers
Answer is under review.
Find string length without using (strlen) function
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
char s[100];
int i;
printf("Enter a string: ");
scanf("%s", &s);
for(i=0; s[i]!='\0'; i);
printf("lenght of string: %d", i);
getch();
}