Rotate your phone or change to desktop for better experience

Rotate your phone or change to desktop for better experience

4. Program to find the length of a string without using built in function.

#include <stdio.h>

void main()

{

char str[10];

int count=0;

printf("\n Please Enter any String :");

gets(str);


while (str[count] != '\0')

count++;

printf("\n String length = %d", count);


}

Post a Comment

0 Comments