Write a program to find length of a string without using library functions.
- #include <stdio.h>
- void main()
- {
- char str[100];
- int i, len = 0;
- printf("Please enter a string : ");
- scanf("%s", str);
- for (i = 0; str[i] != '\0'; i++) {
- len++;
- }
- printf("The length of a string is : %s = %d\n", str, len);
- }
একটি মন্তব্য পোস্ট করুন