Monday, 16 November 2015

Length of string without using function..

#include<conio.h>
#include<stdio.h>
void main()
{
    int i,count=0;
    char a[10];
    printf("enter the string \n");
    gets(a);
    for(i=0;a[i]!='\0';i++)
    {
        count++;
    }

    printf("%d",count);
}

No comments:

Post a Comment