Monday, 19 October 2015

C program to calculate the length of a string

#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
char st[20];
int l;
clrscr();
printf("enter a string: ");
gets(st);
l= strlen(st);
printf("length of the string :%d ",l);
getch();
}

No comments:

Post a Comment