C program to find Length of String (Manual)

#include <stdio.h>
int main() 

{
    char str[50];
    int i;

    printf("Enter the string : ");
    scanf("%s", str);

    for(i = 0; str[i] != '\0'; i++);

    printf("Length = %d", i);
}

Comments

Popular posts from this blog

Single Program Using All Automatic String Functions

C program for subtraction of two matrices (2D Arrays)

C program for Multiplication of Two matrices