Program to find the length of the given string

Program:

#include<stdio.h>
#include<conio.h>
void main()
{
    char str[80];
    int i;
    clrscr();
    printf("Enter the string : ");
    gets(str);
    for(i = 0; str[i] != '\0'; i++);
    printf("\nThe length of the string is : %d", i);
    getch();
}

Output:

Enter the string : welcome
The length of the string is : 7