Write a c program to input a string and find it’s length without using library function
Program:
#include<stdio.h> #include<conio.h> void main() { char a[15]; int i,l=0; printf("\n enter the string :"); scanf("%s",a); for(i=0;a[i]!='\0';i++) l++; printf("\n length=%d",l); getch (); }
Output:
enter the string :ae ryan length=5
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Program:
Output:
need an explanation for this answer? contact us directly to get an explanation for this answer