-->

Facebook

Jasper Roberts - Blog

Saturday, April 4, 2015

Write a C Program to Find out length of string using strlen( ) function.

PRACTICAL-SET-5
2.   Find length of string using strlen( function

#include<stdio.h>
#include<conio.h>
#include<string.h>

void main()
{
int i;
char str[30];

clrscr();

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

i = strlen(str);

printf("Length of the entered string: %d",i);

getch();
}

OUTPUT:
String Length
String Length



No comments:

Post a Comment